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

Breaks with mini-css-extract-plugin@1.3.0 #88

Closed
mihkeleidast opened this issue Nov 7, 2020 · 3 comments
Closed

Breaks with mini-css-extract-plugin@1.3.0 #88

mihkeleidast opened this issue Nov 7, 2020 · 3 comments

Comments

@mihkeleidast
Copy link

Webpack build fails when using both mini-css-extract-plugin@1.3.0 and external-svg-sprite-loader.

I created a repo with repro: https://github.com/mihkeleidast/webpack-css-svg-issue

I originally reported this to mini-css-extract-plugin but I was told this should be fixed here: webpack-contrib/mini-css-extract-plugin#653

@bensampaio
Copy link
Owner

bensampaio commented Nov 9, 2020

Hmm this is an issue 😬 Thanks for reporting, though! I don't have an immediate solution for this issue so I recommend sticking to 1.2.0 if that is working for you. I will look into this in the coming days.

bensampaio added a commit that referenced this issue Nov 9, 2020
* Convert the `CssModule` content to string in order to be able to replace the Sprite URL.
* Convert the `CssModule` content back to `Buffer` if it was a buffer before so that the plugin remains compatible with older versions of `CssModule`.
* Change from `[hash]` to `[contenthash]` since this is now the recommended way of generating hashes and because this should also result in less filename changes.
* Update the `react` example installation so that it uses hashes in order to no longer cache assets.
@bensampaio
Copy link
Owner

@mihkeleidast could you let me know if this issue is fixed when using external-svg-sprite-loader@7.1.0-beta.0?

@mihkeleidast
Copy link
Author

Yes, with the beta the build succeeds.

bensampaio added a commit that referenced this issue Nov 10, 2020
* Convert the `CssModule` content back to the original format so that the plugin remains compatible all versions of `CssModule`.
bensampaio added a commit that referenced this issue Nov 10, 2020
* Convert the `CssModule` content to string in order to be able to replace the Sprite URL.
* Convert the `CssModule` content back to `Buffer` if it was a buffer before so that the plugin remains compatible with older versions of `CssModule`.
* Change from `[hash]` to `[contenthash]` since this is now the recommended way of generating hashes and because this should also result in less filename changes.
* Update the `react` example installation so that it uses hashes in order to no longer cache assets.
bensampaio added a commit that referenced this issue Nov 10, 2020
* Convert the `CssModule` content back to the original format so that the plugin remains compatible all versions of `CssModule`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants