We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b983304 commit b16311fCopy full SHA for b16311f
lib/plugin.js
@@ -145,11 +145,19 @@ function cloneRule (rule, normalizedRule) {
145
return res
146
}
147
148
-const reuseIdentWhitelist = /css-loader/
+const reuseIdentWhitelist = [
149
+ 'css-loader',
150
+ '(vue-)?style-loader',
151
+ 'postcss-loader',
152
+ 'extract-text-webpack-plugin',
153
+ 'mini-css-extract-plugin'
154
+]
155
+
156
+const reuseIdentPattern = new RegExp(`(${reuseIdentWhitelist.join('|')})`)
157
158
function cleanIdent (use) {
159
if (use.ident) {
- if (reuseIdentWhitelist.test(use.loader)) {
160
+ if (reuseIdentPattern.test(use.loader)) {
161
// Reuse options ident, so that imports from within css-loader would get the
162
// exact same request prefixes, avoiding duplicated modules (#1199)
163
use.options.ident = use.ident
style-loader is not compatible with ident option since May 22, 2017, so it shouldn't match reuseIdentWhitelist rules.
ident
reuseIdentWhitelist
Here is the style-loader options.json: https://github.com/webpack-contrib/style-loader/blob/master/options.json pay attention to "additionalProperties": false, so it doesn't allow to use ident option:
"additionalProperties": false
Module build failed: ValidationError: Style Loader Invalid Options options['ident'] is an invalid additional property
1 commit comments
pnbarx commentedon May 14, 2018
style-loader is not compatible with
ident
option since May 22, 2017, so it shouldn't matchreuseIdentWhitelist
rules.Here is the style-loader options.json:
https://github.com/webpack-contrib/style-loader/blob/master/options.json
pay attention to
"additionalProperties": false
, so it doesn't allow to useident
option: