fix(config): compile type compatibility in css-loader v4 (#9014)

This commit is contained in:
Evan Ma 2021-03-22 18:30:19 +08:00 committed by GitHub
parent 21a928f19f
commit 89e8fe07b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 1 deletions

View File

@ -135,6 +135,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },
@ -208,6 +211,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },
@ -287,6 +293,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },
@ -375,6 +384,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },
@ -463,6 +475,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },
@ -548,6 +563,9 @@ exports[`webpack nuxt webpack module.rules 1`] = `
\\"options\\": Object { \\"options\\": Object {
\\"esModule\\": false, \\"esModule\\": false,
\\"importLoaders\\": 2, \\"importLoaders\\": 2,
\\"modules\\": Object {
\\"compileType\\": \\"icss\\",
},
\\"sourceMap\\": false, \\"sourceMap\\": false,
\\"url\\": [Function isUrlResolvingEnabled], \\"url\\": [Function isUrlResolvingEnabled],
}, },

View File

@ -34,7 +34,12 @@ export default () => ({
embed: 'src' embed: 'src'
} }
}, },
css: { esModule: false }, css: {
esModule: false,
modules: {
compileType: 'icss'
}
},
cssModules: { cssModules: {
esModule: false, esModule: false,
modules: { modules: {

View File

@ -71,6 +71,9 @@ Object {
"loaders": Object { "loaders": Object {
"css": Object { "css": Object {
"esModule": false, "esModule": false,
"modules": Object {
"compileType": "icss",
},
"sourceMap": false, "sourceMap": false,
}, },
"cssModules": Object { "cssModules": Object {

View File

@ -55,6 +55,9 @@ Object {
"loaders": Object { "loaders": Object {
"css": Object { "css": Object {
"esModule": false, "esModule": false,
"modules": Object {
"compileType": "icss",
},
}, },
"cssModules": Object { "cssModules": Object {
"esModule": false, "esModule": false,
@ -441,6 +444,9 @@ Object {
"loaders": Object { "loaders": Object {
"css": Object { "css": Object {
"esModule": false, "esModule": false,
"modules": Object {
"compileType": "icss",
},
}, },
"cssModules": Object { "cssModules": Object {
"esModule": false, "esModule": false,