New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watcher not working using TypeScript? #72
Watcher not working using TypeScript? #72
Comments
Thanks for the reproduction. I removed TypeScript from the project and everything works normally. That narrows things. |
Can confirm that, using babel watch works correctly. After digging a while I found that |
There is a bit of file name shuffling in order to get source maps working, and to account for file extension changes. If there is a fix that can be implemented in preprocessor land (as opposed to in the plug-in itself) it likely has to do with that. There are other users that have been using TypeScript though: https://github.com/jlmakes/karma-rollup-preprocessor/blob/master/CHANGELOG.md#fixed-6 but it looks like it was done using Babel. |
I can confirm that there is an issue with watching files and official TS plugin My plugins inside plugins: [
progress(),
babel( {
babelHelpers: 'bundled',
presets: [
'@babel/preset-env',
'@babel/preset-typescript',
'@babel/preset-react'
],
extensions: [ '.ts', '.tsx', '.js' ],
exclude: 'node_modules/**'
} ),
nodeResolve( {
preferBuiltins: false,
extensions: [ '.ts', '.tsx', '.js' ]
} ),
commonJs(),
polyfillNode()
], With babel plugin it's just transpilation (no type checking) but I don't think it's a big deal in case of generating test bundle. |
So I have been spending a few days looking at this and it looks like it's partially related to After diving through the I assume something different happens when running Is there a way to modify the preprocessor to use I'm going to keep messing around with this on my end to see if I can make it work, but any pointers would be great. |
Follow up, after doing an ugly version of the processor that uses It's very specific to my setup right now but it's doing what I need so I will clean it up and if people need it I can post. |
@xenobytezero I'd be curious to see your changes. If you have the time, please submit a PR. |
The changes are tied up in code it's a little tricky to open source right now, will see what I can do. |
@jlmakes - do you think you could integrate this into the package? |
Just spend an hour solving this. My mistake for not looking further after noticing that my version matched your package.json at master. Are you going to release soon? |
Thanks for your patience, the fix landed in |
Seems like that karma auto watch break when using
karma-rollup-preprocessor
.The tests are run when i change something, but with no effect.
Indeed if I make a test fail, I see karma running but it will state that tests passes.
It may be a configuration problem, so here I made a small reproduction of the issue https://github.com/kaosdev/karma-rollup-preprocessor-watch-issue
I saw there are other issue related to auto watch not working, but this seems different, and as far as I understand this feature changed recently (maybe with 7.0.4?).
The text was updated successfully, but these errors were encountered: