You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to correctly parse the chunk resources in the library packaged by another webpack in webpack5? #15947
After the code is executed, it will report the error Not allowed to load local resource: file:///Users/os/xxx/dist/chunk.xxxx.js
Then I checked the function __webpack_require__.f.j that loads the chunks resource in the index.js file in the library, the url of the chunk resource in the generated code is
I think this is the reason for the error, because the variable url always returns a file address (file://xxx/xxx/), I think it should be the address that uses the URL for processing, such as
But after I modified the code, it still could not be parsed correctly until the value of __webpack_require__.u(chunkId) was directly filled in, which is the file name of the chunk
varurl=newURL('chunk.xxxx.js',import.meta.url);
At this time, the call is normal, and the url of the chunks file can be parsed normally.
Activity
vankop commentedon Jun 20, 2022
library.type=moduleneed some enhancement, but unfortunately this is low priority...vankop commentedon Jun 20, 2022
added on board https://github.com/webpack/webpack/projects/8#column-18928777
webpack-bot commentedon Sep 20, 2022
This issue had no activity for at least three months.
It's subject to automatic issue closing if there is no activity in the next 15 days.
alexander-akait commentedon Sep 22, 2022
bump
webpack-bot commentedon Jan 7, 2023
Issue was closed because of inactivity.
If you think this is still a valid issue, please file a new issue with additional information.
alexander-akait commentedon May 29, 2023
Let's close in favor #17121