aurelia / webpack-plugin

A plugin for webpack that enables bundling Aurelia applications.
MIT License
90 stars 36 forks source link

fixupCSSUrls throws when scss file includes @import url(https://...) directive. #184

Closed ItWorksOnMyMachine closed 3 years ago

ItWorksOnMyMachine commented 3 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: When using scss with @import url() the fixupCSSUrls is throwing an exception because the css argument is null. I believe this is something Aurelia Webpack Plugin is doing because the compiled scss content is available in the bundled js output file. You should be able to reproduce this by including the following in a scss file.

@import url(https://fonts.googleapis.com/css?family=Open+Sans&display=swap);

If I comment out that line, then the only difference in the bundled file is the below line:

___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css?family=Open+Sans&display=swap);\"]);\n

And for reference, this is what webpack 4 produced:

___CSS_LOADER_EXPORT___.push([module.i, \"@import url(https://fonts.googleapis.com/css?family=Open+Sans&display=swap);\"]);\n

I haven't been able to track down where this is causing a problem and I'm not really sure where to go from here.

Expected/desired behavior: I would expect the scss file to load properly.

ItWorksOnMyMachine commented 3 years ago

This appears to be a regression in css-loader. Closing this here and will be opening an issue in that repo instead.

bigopon commented 3 years ago

@ItWorksOnMyMachine thanks @ItWorksOnMyMachine