Skip to content

Sass-loader 8.0.0 not working with Vue-cli 3 #4526

Closed
@Goldziher

Description

@Goldziher

Version

3.11.0

Environment info

Environment Info:

  System:
    OS: macOS 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.10.3 - /usr/local/bin/npm
  Browsers:
    Chrome: 76.0.3809.132
    Firefox: 68.0.2
    Safari: 12.1.2
  npmPackages:
    @3yourmind/vue-yodify: ^0.2.9 => 0.2.9 
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app: ^3.11.0 => 3.11.0 
    @vue/babel-preset-jsx:  1.1.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.1.0 
    @vue/cli-overlay:  3.11.0 
    @vue/cli-plugin-babel: ^3.11.0 => 3.11.0 
    @vue/cli-plugin-unit-jest: ^3.11.0 => 3.11.0 
    @vue/cli-service: ^3.11.0 => 3.11.0 
    @vue/cli-shared-utils:  3.11.0 
    @vue/component-compiler-utils:  3.0.0 
    @vue/eslint-config-prettier: ^5.0.0 => 5.0.0 
    @vue/preload-webpack-plugin:  1.1.1 
    @vue/test-utils: ^1.0.0-beta.29 => 1.0.0-beta.29 
    @vue/web-component-wrapper:  1.2.0 
    babel-helper-vue-jsx-merge-props:  2.0.3 
    eslint-plugin-vue: ^5.2.3 => 5.2.3 
    jest-serializer-vue:  2.0.2 
    typescript: ^3.6.2 => 3.6.2 
    vue: ^2.6.10 => 2.6.10 
    vue-autosize: ^1.0.2 => 1.0.2 
    vue-clickaway: ^2.2.2 => 2.2.2 
    vue-cropper: ^0.4.9 => 0.4.9 
    vue-echarts: ^4.0.3 => 4.0.3 
    vue-eslint-parser: ^6.0.4 => 6.0.4 (5.0.0)
    vue-hot-reload-api:  2.3.3 
    vue-i18n: ^8.14.0 => 8.14.0 
    vue-jest:  3.0.4 
    vue-loader:  15.7.1 
    vue-meta: ^2.2.1 => 2.2.1 
    vue-multiselect: ^2.1.6 => 2.1.6 
    vue-popperjs:  2.0.4 
    vue-router: ^3.1.2 => 3.1.2 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vue2-ace-editor: ^0.0.13 => 0.0.13 
    vuedraggable: ^2.23.0 => 2.23.0 
    vuex: ^3.1.1 => 3.1.1 
    vuex-router-sync: ^5.0.0 => 5.0.0 
  npmGlobalPackages:
    @vue/cli: 3.11.0

Steps to reproduce

Install Sass-loader 8.0.0 and try to configure it to prependData in the vue.config.js - this does not work.

What is expected?

This is working using v7.3.1 of sass-loader

css: {
	loaderOptions: {
		sass: {
			data: "@import '~::shared/assets/variables.scss';",
		},
	},
},

What is actually happening?

This is not working using version 8.0.0:

css: {
	loaderOptions: {
		sass: {
			prependData: "@import '~::shared/assets/variables.scss';",
		},
	},
},

I tried solving this using the chain webpack interface but didn't have much luck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs reproductionThis issue is missing a minimal runnable reproduction, provided by the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions