Closed
Description
Version
3.0.0-beta.15
Reproduction link
https://github.com/gkoscevic/css-issue-repro-vuecli
Steps to reproduce
- Spin up basic project with
vue create
- Add
vue.config.js
file to root - Add
camelCase: 'only'
option insidecss
object
module.exports = {
css: {
camelCase: 'only'
}
};
- run
npm run serve
What is expected?
That the camelCase option is added to the css-loader inside the generated webpack config.
What is actually happening?
This error in the console...
$ vue-cli-service serve
ERROR Invalid options in vue.config.js: child "css" fails because ["camelCase" is not allowed]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This could be intentional that the cli only accepts a specific set of css-loader
options, and I saw that a schema is set in the cli service to define the options you can pass in.
I'm not sure how else to achieve this if the cli is not meant to accept this option. I tried using webpackChain to add the option to the css rule but that also wasn't working. That could also be me just not understanding what webpackChain is actually doing though :)