The issue isn't present in vue-loader@17
vuejs/vue-loader#1849 - vue-loader@16
patches Webpack in a way that prevents the usage of Webpack's layers.
- It's an experimental feature: https://webpack.js.org/configuration/experiments/#experiments
- There isn't much documentation to it: webpack/webpack#12327, https://webpack.js.org/configuration/module/#rulelayer, https://webpack.js.org/configuration/module/#ruleissuerlayer and https://webpack.js.org/configuration/entry-context/#entry-descriptor
- However, the feature lets you process the same CSS differently when it's imported by a certain entry point or file, which cannot be accomplished in any other way.
- cd into the cloned repo, run
npm run build
, get an error - checkout to
040fe39
where Vue Plugin isn't being used, runnpm run build
, get a compiled bundle
[webpack-cli] Error: Compiling RuleSet failed: Properties issuerLayer are unknown (at ruleSet[0]: [object Object])
at RuleSetCompiler.error (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/rules/RuleSetCompiler.js:373:10)
at RuleSetCompiler.compileRule (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/rules/RuleSetCompiler.js:196:15)
at /Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/rules/RuleSetCompiler.js:154:9
at Array.map (<anonymous>)
at RuleSetCompiler.compileRules (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/rules/RuleSetCompiler.js:153:16)
at RuleSetCompiler.compile (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/rules/RuleSetCompiler.js:68:22)
at match (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/vue-loader/dist/pluginWebpack5.js:156:35)
at VueLoaderPlugin.apply (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/vue-loader/dist/pluginWebpack5.js:61:24)
at createCompiler (/Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/webpack.js:73:12)
at /Volumes/Repos/vue-loader-and-webpack-layers/node_modules/webpack/lib/webpack.js:44:48
Vue Loader's set of rules doesn't match Webpack's