-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
Stale statsFile
#821
Comments
Hey @Dattaya 👋, |
reopening, thought the issue was fixed by adding '@loadable/server' to webpackNodeExternals allowlist, but it's not the case. It was working, because I locally modified utils to leverage |
@Dattaya What was the resolution here? Or did you end up using a local modification? |
@rtymchyk, sorry for the delayed response. I changed my mind, because usually issues are closed when they're fixed, not when included in a new release. In the meantime you can modify |
🐛 Bug Report
I hot reload the server in my boilerplate and for some reason
new ChunkExtractor({ statsFile })
loads oldstatsFile
and it's not present inrequire.cache
soclearModuleCache
can't do anything much. ChangingsmartRequire
in utils toJSON.parse(fs.readFileSync(modulePath));
fixes the problem. I can send a PR if you're interested.To Reproduce
Tested on Linux, might not work on other OSs:
git clone https://github.com/Dattaya/ts-react-ssr-basis && cd ts-react-ssr-basis && npm i && npm start
http://localhost:3000/
and view page source (Ctrl+U in Chrome)common/components/App/index.tsx
, save it, reload the page source and observe thatscript src=
points to the old js file.Expected behavior
ChunkExtractor.getScriptTags
returns updated assets.npx envinfo
The text was updated successfully, but these errors were encountered: