mini-css-extract-plugin icon indicating copy to clipboard operation
mini-css-extract-plugin copied to clipboard

new URL(“./path/to/file.css”, import.meta.url) is incorrect

Open sgarfinkel opened this issue 1 year ago • 1 comments

Bug report

The mini-css-extract-plugin prevents webpack from resolving URLs to the emitted CSS asset. Instead, this is resolved to the JS chunk, which contains no data. The expected result is that this instead resolves appropriately to the actual CSS asset.

Actual Behavior

See above. The URL will resolve to the JS chunk instead of the CSS asset.

Expected Behavior

The URL should resolve to the emitted CSS asset.

How Do We Reproduce?

Very easy to reproduce, simply bundle a URL that points to a CSS file.

Please paste the results of npx webpack-cli info here, and mention other relevant information

sgarfinkel avatar Aug 10 '23 14:08 sgarfinkel