-
-
Notifications
You must be signed in to change notification settings - Fork 384
Concatenating multiple css files breaks js file #582
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
Comments
Try this solution: |
Big thanks for this link. Unfortunately solution that you mentioned doesn't work for me. It works if i have one js file, but the goal is to extract css from multiple js files. When i added another file i get a error But another solution from this comment is work for me - #408 (comment) So now i have a question.
Why webpack generate additional fourth And why i need to add it in my html? I changed repo. So you can look at this fourth file
Also in docs there is nothing about generating and adding additional file to html |
@felixcatto please report about this in |
If you look at repo, it doesn't contain this plugin. How i can report it in |
Looks like adding |
Yep, fixed in webpack@5 and in the latest mini-css-extract-plugin version, And yes, using |
Bug report
What is the current behavior?
I am trying to extract multiple css files from js files and concatenate it into one css file. I use this documentation https://webpack.js.org/plugins/mini-css-extract-plugin/#extracting-all-css-in-a-single-file. The css files extracted and concatenated well, but after it, js files from which it extracted breaks, i.e. it stops executing at all.
If the current behavior is a bug, please provide the steps to reproduce.
I created repo and left only css-loader and optimization section. When optimization section commented out, js correctly executed and in console 'it works' appears. But when optimization uncommented, js doesn't executed and console stays empty
Steps to reproduce
What is the expected behavior?
Expected result: js at index.js should be executed, i.e. you should see 'it works' in console
Actual result: js doesn't executed, because you don't see anything in console
Other relevant information:
webpack version: 4.44.1
Node.js version: 12.18.2
Operating System: ubuntu, 16.04
This issue was moved from webpack/webpack#11436 by @evilebottnawi. Original issue was by @felixcatto.
The text was updated successfully, but these errors were encountered: