When executed in environment without window or document (e.g. worker), style loader should not try to inject styles.
Actual Behavior / Situation
Fails with error while trying to access document.createElement
This was already discussed some time ago (#203), but I'm not sure if it was ever resolved. Please let me know if this is something you consider reasonable or if you think it's better to left it as is (raising exception)
I also made a ad-hoc fix for my project (forked this repo and tried to patch it diff), I'm not sure if it's sufficient and covers all cases (I use very basic configuration and patch works with it), but I'm willing to adjust it and make pull request if you find it useful
Please paste the results of npx webpack-cli info here, and mention other relevant information
Modification Proposal
Expected Behavior / Situation
When executed in environment without
window
ordocument
(e.g. worker), style loader should not try to inject styles.Actual Behavior / Situation
Fails with error while trying to access
document.createElement
This was already discussed some time ago (#203), but I'm not sure if it was ever resolved. Please let me know if this is something you consider reasonable or if you think it's better to left it as is (raising exception)
I also made a ad-hoc fix for my project (forked this repo and tried to patch it diff), I'm not sure if it's sufficient and covers all cases (I use very basic configuration and patch works with it), but I'm willing to adjust it and make pull request if you find it useful
Please paste the results of
npx webpack-cli info
here, and mention other relevant information