Closed mpfluger closed 9 years ago
I need a reproduction that I can run to dig into this. Haven't touched CoffeeScript in years.
The simple sample project:
https://github.com/mpfluger/proxyquireify_coffee
npm test
will run fine, but when making a change to test/a_spec.js.coffee
it shows the error seen above.
Thanks for looking into this!
Not related to proxyquireify actually:
bundle.once('prebundle', handler)
If you re-register transforms and plugins every time, the second time around you have CS -> PQ -> CS -> PQ. The CS transform gets and chokes on valid JS from PQ.
So simple, so true ;)
Thanks!
So this fixes the problem when editing a test, but it breaks it for editing source files. Any ideas?
Nothing comes to mind. Since this isn't a proxyquireify issue, I'm happy to continue discussion at karma-browserify if you're able to do some further investigation and propose a solution.
The problem was that I included both the src/ and test/ files for karma to watch. Removing the src/ files fixed the problem for me. And the bundle would still get created again after touching a src/ file.
First off, thanks for making the changes to get proxyquireify working with transforms. This has made our setup a bit easier. There is a problem we run into though. Everything works fine when running the test suite the first time, but after changing one of the tests, the transform doesn't run again. The tests are written in CoffeeScript.
Here's the output after changing a test file:
So it does try to bundle it again, but it doesn't transform the CoffeeScript test to JS when changing the file.
Relevant part of karma.conf.js: