Closed mizok closed 2 years ago
@dc7290
I found this problem is reproducible in your another repository, too.
https://github.com/dc7290/ejs-wepack-template
Just take a try : include a new ejs
file(let's call it example.ejs
) inside /layout/header.ejs
, then npm run dev
, then try to change/add something in example.ejs
, you will find that webpack-dev-server
just ignore that change.
What happened? :
I found this problem yesterday, I have an
index.ejs
, afooter.ejs
, and asvg-sprite.ejs
just like below.index.ejs
:footer.ejs
:svg-sprite.ejs
:You can see that
svg-sprite.ejs
is actually "nested" infooter.ejs
, but not inindex.ejs
(Hereindex.ejs
is the template I use as an entry template forhtmlWebpackPlugin
).The problem is that when I saved the change in
svg-sprite.ejs
,webpack-dev-server
just didn't get that change.BTW It seemed NOT a problem about hot module reload(HMR), because even I turned off the
hot
option indevServer
, this still happened, and I also set thewatchFiles
option for those partial template , but it was still not working.Expected behavior:
Just need webpack-dev-server to watch the change of those nested partial template.
Any idea about how to fix this ? If you need a reproducible repository for testing, feel free to ask for it :)
PS. Actually I know a little bit Japanese, I guess it's ok to read comments written in Japanese.