...
To ignore files from being scanned, create a file called
.slignore
and list in it the file names to match againstIf you are using source maps, you can ignore original files from being included by creating a file called
.slignore.generated
Both files use glob pattern aligned to .gitignore format
A common best practice is to analyze your project files via the output of a command like tree --du -h -I 'node_modules|sl-dry-run-output|sl_dist' -P "*.[jt]s*"
When executed from the root folder of your project, it helps to define accurate Ignore Rules described below based on the detailed list of javascript and typescript files the agent will find.
Ignoring test files
For example, a common best practice is to exclude all the test files from the Build Scan.
...
Code Block |
---|
*vendor*.js *runtime*.js *inline*.js *polyfills*.js |
It is recommended as well to ignore legacy versions of JS files generated for backward compatibility of older browser versions like es5
, es2015
…
Code Block |
---|
**/es5
*-es5.js |
More information about the potential consequences is detailed in a dedicated article https://sealights.atlassian.net/l/c/dr2yUT7g
Ignoring common mapped files (Images and HTML)
...
Code Block |
---|
#Ignore everything but files matching patterns below (starting with !) * !*chunk*.js !*main*.js |
Info |
---|
For more details about the format, please refer to the official git documentation that Sealights strictly aligns with. |
...