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

Plugin overwrites SASS prependData project configuration #128

Closed
Lanchi opened this issue Oct 18, 2019 · 2 comments
Closed

Plugin overwrites SASS prependData project configuration #128

Lanchi opened this issue Oct 18, 2019 · 2 comments

Comments

@Lanchi
Copy link
Contributor

Lanchi commented Oct 18, 2019

Inside vue.config.js I have css.loaderOptions option defined as following:

css: {
    loaderOptions: {
      sass: {
        prependData: `@import "~@/styles/_mixins.scss"`,
      },
      scss: {
        prependData: `@import "~@/styles/_mixins.scss";`,
      }
    },
},

This is official recommendation for passing options to pre-processor loaders, instead of using chainWebpack.

However, Vuetify cli plugin is using chainWebpack and overwrites the user defined configuration. I placed logs for opt.prependData before and after line 56 in util/helpers and here's what I get:

BEFORE @import "~@/styles/_mixins.scss";
AFTER @import '@/styles/variables.scss';
@import '~vuetify/src/styles/styles.sass';

Vuetify plugin should concatenate it's imports to the existing ones, or not use chainWebpack but the recommended way of defining these options.

Vue CLI service: 4.0.3
Vuetify: 2.1.4
Vue CLI plugin Vuetify: 1.0.2

@DRoet
Copy link
Contributor

DRoet commented Oct 20, 2019

Are you suggesting we just do opt.prependData += data.join('\n') instead?

feel free to PR it

@Lanchi
Copy link
Contributor Author

Lanchi commented Oct 21, 2019

Are you suggesting we just do opt.prependData += data.join('\n') instead?

Something along those lines.

feel free to PR it

Will do.

Lanchi added a commit to Lanchi/vue-cli-plugin-vuetify that referenced this issue Oct 21, 2019
@DRoet DRoet closed this as completed in b2bea45 Oct 21, 2019
robertstewart89 added a commit to robertstewart89/laravel-vue-cli-plugins-develop that referenced this issue Sep 24, 2022
renaforsberg824 added a commit to renaforsberg824/cli-plugins-build-vue-dev that referenced this issue Oct 5, 2022
sadafrangian3 pushed a commit to sadafrangian3/cli-plugins-vue that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants