-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
css-loader options error #4357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi Thanks for filing this issue! Could you please provide a small reproduction on jsfiddle.net or as a github reporsitory so we can debug this without trying to replicate this ourselves?` That would be very helpful, thanks! |
It‘s quite simple,in css-loader 3.1.0, it's options like this: {
modules: {
mode: 'local',
localIdentName: '[path][name]__[local]--[hash:base64:5]',
context: path.resolve(__dirname, 'src'),
hashPrefix: 'my-custom-hash',
},
localsConvention: 'camelCaseOnly,
} but in this line: const { localIdentName = '[name]_[local]_[hash:base64:5]' } = loaderOptions.css || {}
Object.assign(cssLoaderOptions, {
modules: {
localIdentName,
},
}) so, when pass: {
modules: {
localIdentName: '[folder]-[name]-[local][emoji]',
},
localsConvention: 'camelCaseOnly,
} get: {
modules: {
localIdentName: '[name]_[local]_[hash:base64:5]',
},
localsConvention: 'camelCaseOnly,
} That's not i wanted pass: {
localIdentName: '[folder]-[name]-[local][emoji]',
localsConvention: 'camelCaseOnly,
} get: {
modules: {
localIdentName: '[folder]-[name]-[local][emoji]',
},
localIdentName: '[folder]-[name]-[local][emoji]',
localsConvention: 'camelCaseOnly,
} That's will get a ValidationError |
And, how about this option: css.modules?
|
Version
4.0.0-beta.1
Reproduction link
https://github.com/vuejs/vue-cli
Environment info
Steps to reproduce
What is expected?
correct css-loader option
What is actually happening?
wrong
vue-cli/packages/@vue/cli-service/lib/config/css.js
Line 126 in 76eb714
The text was updated successfully, but these errors were encountered: