Skip to content
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

Template change doesn't trigger recompilation in watch mode #5

Closed
Kagami opened this issue Dec 1, 2014 · 3 comments · Fixed by #8
Closed

Template change doesn't trigger recompilation in watch mode #5

Kagami opened this issue Dec 1, 2014 · 3 comments · Fixed by #8

Comments

@Kagami
Copy link

Kagami commented Dec 1, 2014

Hi. Thanks for the great plugin.
There is one minor issue though I'm not sure is it the right place to address it.

When I run webpack-dev-server and change some javascript file in dependency graph, webpack notices it and recompiles the bundle. But it doesn't work for html-webpack-plugin templates. Could this be fixed? Thanks.

@kurtharriger
Copy link
Contributor

Adding the following tells webpack to recompile when file has changed. Hot reloading doesn't seem to work, but at least I can reload the page to see changes rather than killing and restarting webpack.

compiler.fileDependencies.push(templateFile);

kurtharriger added a commit to kurtharriger/html-webpack-plugin that referenced this issue Jan 12, 2015
Instruct webpack to watch and recompile when template file has changed.

Fixes jantimon#5
@tomchentw
Copy link

Thanks @kurtharriger for the improvement. Sadly hot reload won't work in this case.

@lock
Copy link

lock bot commented Jun 1, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants