Skip to content

Commit d542d84

Browse files
committed
revert back DEFAULT_OPTIONS for modules option
1 parent 2712a3a commit d542d84

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/loader.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,16 +427,18 @@ module.exports = function (content) {
427427
function addCssModulesToLoader (loader, part, index) {
428428
if (!part.module) return loader
429429
var option = options.cssModules || {}
430+
var DEFAULT_OPTIONS = {
431+
modules: true
432+
}
430433
var OPTIONS = {
431434
localIdentName: '[hash:base64]',
432-
modules: true,
433435
importLoaders: true
434436
}
435437
return loader.replace(/((?:^|!)css(?:-loader)?)(\?[^!]*)?/, function (m, $1, $2) {
436438
// $1: !css-loader
437439
// $2: ?a=b
438440
var query = loaderUtils.parseQuery($2 || '?')
439-
Object.assign(query, OPTIONS, option)
441+
Object.assign(query, OPTIONS, option, DEFAULT_OPTIONS)
440442
if (index !== -1) {
441443
// Note:
442444
// Class name is generated according to its filename.

0 commit comments

Comments
 (0)