I use webpack, which accepts regular expressions to feed files to bootloaders. I want to exclude test files from the assembly, and test files end with .test.js. So, I'm looking for a regex that will match index.js, but not index.test.js.
I tried using a negative return statement with
/(?<!\.test)\.js$/
but he says the expression is unacceptable.
SyntaxError: Invalid regular expression: /(?<!\.test)\.js$/: Invalid group
Examples of file names:
index.js
index.test.js
component.js
component.test.js
source
share