-
Notifications
You must be signed in to change notification settings - Fork 37
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
Hot reloading text #74
Comments
I think this is the same issue as I was having with json files, check out #31 |
@happylinks Thanks! You where right. I moved my file to a packages: {
"content": {
meta: {
'*.text': { loader: 'text' }
}
}
}, This reloads the file and the files that depend on it. But, people will sometimes try to use |
@peteruithoven probably wouldn't be bad idea to mention it in the readme somewhere. |
this was disabled pending rollout of systemjs/builder@13ed8f8
When that PR goes in, as long as you are using a transpiler (unless the fix the only loading esmodule issue) then 'file.txt!', and any other resource loader that functions by embedding an esmodule will detect changes. I'm pretty sure you have to use the ! notation with nothing following though, hot-reloader does it's own thing with !'s and I think it ends up not figuring out the reference if you put file.txt!text.js |
The hot module reloading does not work for me with html files. |
I've never successfully gotten the meta section to do anything, I'm running under the assumption there's some vague incompatibility, or just features that are lagging between jspm/systemjs/hot-reloader. |
@svi3c but you're also using the @beta version of jspm / systemjs, maybe it deserves a separate issue? Does this work with the last stable? @npbenjohnson which jspm / systemjs version you use? |
I've only been on the latest minor stable of both. I haven't spent much time trying to get meta working because config related issues seem to generally fail in silent, non-fatal, and mysterious ways. |
@peteruithoven I just created #91 for the jspm 0.17 beta issue. |
Don't put the plugin name after the !, |
Thanks, @npbenjohnson. Now I tried the following three variants with jspm 0.17 beta:
All variants worked for loading the template via plugin-text, but none of them triggered a hot module replacement when changing the template. |
@svi3c I have hot reload for templates working with one small issue, which has a simple workaround for now. You can see it in the latest https://github.com/capaj/jspm-ng2 repo with 0.5.9 Workaround is that hot reload must be called on the root file just after initial load. I have mentioned it to @guybedford here: #73 (comment) hopefully, he'll point us to the right direction of fixing that problem as well. @peteruithoven so can you test with 0.5.9 release if it works for you? It should be, if not, we can reopen. |
I have a project where I'm loading shader (.glsl) files with the text loader plugin, but changes to these files don't trigger a hot reload.
I've tried creating a simple example, loading a text file using
import content from './content.text!text';
. The systemjs-hot-reloader code seems to get the change event, but it can't get the module record?https://github.com/capaj/systemjs-hot-reloader/blob/master/hot-reloader.js#L176
It emits the following error:
The text was updated successfully, but these errors were encountered: