I have a project that runs the test files named \"*.test.ts\" with jest and ts-jest. This is fine but when I launch webpack, I get errors for the test files:
ERR
You can specify a function instead of the regular expression for the loader test property; this can give you a more control.
test
test: function (modulePath) { return modulePath.endsWith('.ts') && !modulePath.endsWith('test.ts'); }