Open dbabaioff opened 9 years ago
As long as you're not changing the path, just adding query parameters, it should work the exact same way.
Just add your hook to your config file and it'll get used by SystemJS when it calls System.import()
.
I'm surprised you need cache busting with karma-systemjs. Are your karma tests having caching problems?
Yes. Only if I kill the karma server my changes take effect. (I'm using webstorm to run my tests) I just tried the cache busting, but still getting cached files. Do you have an idea what can be? It started after using karma-systemjs, before was working fine..
Hmmmm. I always assumed Karma browser launchers specify switches to disable caching in the browsers. I'll need to try and replicate it locally. Can you supply a github project that reproduces it? What browser are you using?
I tryied on PhantomJS and Chrome. I'll give you the github repo later..
@rolaveric , you can use any sample in https://github.com/unional/karma-systemjs-sample All three of them are working on command line but have the cache problem when runing in webStorm / phpStorm.
I'm also eagerly looking for this functionality.
Thanks,
Thanks @unional Right, so the problem is specific to Webstorm/IntelliJ. Sorry, despite using Webstorm I tend to use the command line, or at most use grunt or gulp tasks, so I've never seen this before. Very weird. I'll dig into the intellij karma launcher and see what I can find.
Sorry I haven't had much time to look into this issue, and I'm not quite sure where to start other than digging through the IntelliJ plugin code. If anyone has any ideas or can spend some time looking into the issue, that'd be greatly appreciated.
Seems similar to this one: https://youtrack.jetbrains.com/issue/WEB-12496
In this issue a possible workaround is suggested, which does seem to work for me. (On windows: adjusting the refresh property in C:\Program Files (x86)\JetBrains\WebStorm 11.0.3\plugins\js-karma\js_reporter\karma-intellij\lib\intellijRunner.js )
Based on this discussion https://github.com/systemjs/systemjs/issues/172, I'm trying to implement a cache busting extension for karma-systemjs. There is a doc page (https://github.com/ModuleLoader/es6-module-loader/blob/master/docs/loader-extensions.md#custom-extension-example---cache-busting-extension) showig how to extend the ES6 loader.
How can I implement this using karma-systemjs?