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

Manifest populates main entry point with unrelated files with webpack 5 #237

Closed
KrofDrakula opened this issue Dec 14, 2020 · 3 comments · Fixed by #249
Closed

Manifest populates main entry point with unrelated files with webpack 5 #237

KrofDrakula opened this issue Dec 14, 2020 · 3 comments · Fixed by #249

Comments

@KrofDrakula
Copy link

Expected Behavior

When configuring external files via file-loader in the rules section, I would not expect the files to populate the manifest file with the entry name and the imported file. In the above example I would expect:

{
  "main.js": "main-c53637abe0.js",
  "demo.svg": "demo-d96fd782eb31f2e1c11b1a3f0ab2bb18.svg"
}

Actual Behavior

Importing an .svg file using file-loader with content hashes causes the manifest to override the entry name and appending the loaded file extension, in my case:

{
  "main.js": "main-c53637abe0.js",
  "main.svg": "demo-d96fd782eb31f2e1c11b1a3f0ab2bb18.svg",
  "demo.svg": "demo-d96fd782eb31f2e1c11b1a3f0ab2bb18.svg"
}

Additional Information

My guess is that this has to do with the plugin matching the content hash and assuming the loaded assets are also entry points.

@shellscape
Copy link
Owner

Thanks for opening an issue and for the reproduction. This is more likely due to how webpack reports assets in v5. I'll take a look when I'm able but feel free to take a peek and try at a PR.

@shellscape
Copy link
Owner

@n1c01ash please refrain from "me too" replied. Use the reaction buttons instead.

@weaverryan
Copy link
Contributor

Hi! I may have fixed this on #249 - there are details on how to test at the bottom :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants