D
D
Dmitry2017-09-14 12:38:35
Ruby on Rails
Dmitry, 2017-09-14 12:38:35

How to start using SCSS in *.vue for Rails?

If I specify it in the app/javascript/packs/element.vue file,
style lang="scss" scoped
I get an error:
ERROR in ./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id ":"data-v-d8154932","scoped":true,"hasInlineConfig":false}!./node_modules/postcss-loader/lib!./node_modules/sass-loader/lib/loader.js!./node_modules /vue-loader/lib/selector.js?type=styles&index=0!./app/javascript/packs/element.vue
Module build failed: Error: No PostCSS Config found in: /Users/dmitry/rails/website/app /javascript/packs Scss is already specified
in config /webpack/loaders/ vue.js:

module.exports = {
  test: /.vue$/,
  loader: 'vue-loader',
  options: {
    extractCSS: true,
    loaders: {
      js: 'babel-loader',
      file: 'file-loader',
      scss: 'vue-style-loader!css-loader!postcss-loader!sass-loader',
      sass: 'vue-style-loader!css-loader!postcss-loader!sass-loader?indentedSyntax'
    }
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-09-14
@svetozar

The recording worked
(I took it from here ), you can shorten it to
but how to make it so that you can just write "scss"?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question