Skip to content

CSS config object won't accept camelCase option #1484

Closed
@gkoscevic

Description

@gkoscevic

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 :)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions