It has been observed that in chunkExtractor.js of @loadable/server, the class variable this.chunks retains the previous chunks in its list when a new HTML is returned upon requesting a new URL
Expected behavior
The server should emit all necessary split chunks on each new request, and it should not cache the chunks from previous requests
In the above snippets static/js/artist.a7a73238.js chunk should not be emitted by the server as it doesn't belong to the currently requested url
Link to repl or repo (highly encouraged)
Please provide a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
🐛 Bug Report
Server is not emitting fresh split chunks on new requests; instead, it is caching the chunks from previous requests and merging them with the new ones
Project Dependencies React: 18 React-router: 6.18 Loadable: 5.16 Node: 16.17 NPM: 8.15
To Reproduce
Steps to reproduce the behavior: when server is made up on first request all the split chunks are emitted correctly (url:http://localhost:5000/artist/unknown/6214cdf1f83bd744e8ab2851?pageId=artistDetail) ->
on second request to different url (http://localhost:5000/account-deletion), previous req chunk () is also made with new chunks ->
Implementation Details->
SSR implementation:
Element Render component
CSR Implementation
It has been observed that in chunkExtractor.js of @loadable/server, the class variable this.chunks retains the previous chunks in its list when a new HTML is returned upon requesting a new URL
Expected behavior
The server should emit all necessary split chunks on each new request, and it should not cache the chunks from previous requests
In the above snippets static/js/artist.a7a73238.js chunk should not be emitted by the server as it doesn't belong to the currently requested url
Link to repl or repo (highly encouraged)
Please provide a minimal repository on GitHub.
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard
Paste the results here: