Syntax-errors in tests fails to compile, but are not picked up by watch #152
Description
Is this a bug report?
Bug report
Can you also reproduce the problem with npm 4.x?
I'm running npm 5.3
Same bug on yarn 0.27.5
Environment
npm ls react-scripts-ts
(if you haven’t ejected): 2.6.0node -v
: 8.4 currently, issue is also on 7.x branchnpm -v
: 5.3yarn --version
(if you use Yarn): 0.27.5
Then, specify:
- Operating system: Windows 10 for me. Problem also occurs on OSX Sierra.
Bug report
If you run yarn/npm start with a syntax error in your tests, it crashes and reports a tsc error. However if you then fix the syntax error, an incremental recompilation is not triggered.
I'd expect it to either not error on the tests at all, or also pick up the changes when the tests are changed.
I think perhaps this might have something to do with webpack building a dependency graph, and only compiling files that are referenced by the entry point.
Support for this thesis: The test files are not picked up for recompilation. However if i export something from the test file, and then import it into e.g. app.tsx, the test files are picked up for incremental recompilation, and it's possible to fix the syntax error and continue developing.