Skip to content
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

CSS config object won't accept camelCase option #1484

Closed
gkoscevic opened this issue Jun 6, 2018 · 0 comments
Closed

CSS config object won't accept camelCase option #1484

gkoscevic opened this issue Jun 6, 2018 · 0 comments

Comments

@gkoscevic
Copy link

Version

3.0.0-beta.15

Reproduction link

https://github.com/gkoscevic/css-issue-repro-vuecli

Steps to reproduce

  1. Spin up basic project with vue create
  2. Add vue.config.js file to root
  3. Add camelCase: 'only' option inside css object
module.exports = {
  css: {
    camelCase: 'only'
  }
};
  1. 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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants