Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

[Bug Report] Sass-loader 9.0.1 prependData option removed, use additionalData instead breaks build #189

Closed
avenmore opened this issue Jul 7, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@avenmore
Copy link

avenmore commented Jul 7, 2020

Environment

Vuetify Version: 2.3.3
Vue Version: 2.6.11
Browsers: Firefox 78.0
OS: Windows 10

Steps to reproduce

Update sass-loader to 9.0.1 and "npm run build". Outputs a flood of errors about invalid option prependData.

Expected Behavior

Project builds.

Actual Behavior

Build fails.

Reproduction Link

Other comments

This change is listed under breaking changes for sass-loader 9.0.0.

I was able to build by hacking the following files:

...\node_modules\vuetify-loader\dev\webpack.config.js

function sassLoaderOptions (indentedSyntax = false) {
  return {
    implementation: require('sass'),
    additionalData: `@import "~@/_variables.scss"` + (indentedSyntax ? '' : ';'), //!
    sassOptions: { indentedSyntax },
  }
}

...\node_modules\vue-cli-plugin-vuetify\util\helpers.js

  } else if (sassLoaderVersion < 9) {
    if (opt.prependData) data.unshift(opt.prependData)
    opt.prependData = data.join('\n')
  } else {
    if (opt.additionalData) data.unshift(opt.additionalData)
    opt.additionalData = data.join('\n')
  }
@DRoet
Copy link
Contributor

DRoet commented Jul 7, 2020

duplicate of #185

@jacekkarczmarczyk jacekkarczmarczyk added the duplicate This issue or pull request already exists label Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants