refactor: Specify css-loader options #161
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this will make it easier to upgrade
css-loader
, which in turn I think will be necessary in order to upgrade to webpack 5.At the time of writing, the latest version of
css-loader
that matches^3.2.0
– and the one used in the bootstrapped userscript, SimonAlling/example-userscript@d1d30ea5 and SimonAlling/better-sweclockers@7381699f, according tonpm why
– is 3.6.0. I went here to check what its default options are, and then I specified them. For some of them, the documented default value isn't obviously correct/sensible:hashPrefix
The documented default value is
undefined
, but based on the source code, it's actually""
. That makes much more sense to me too.getLocalIdent
The documented default value is
undefined
, but specifying that causes consuming userscripts (e.g. SimonAlling/example-userscript@d1d30ea5) to fail to build with this error:localIdentRegExp
The documented default value is
undefined
, but based on the source code, it's actuallynull
. Specifyingnull
, however, causes consuming userscripts (e.g. SimonAlling/example-userscript@d1d30ea5) to fail to build with this error: