1
resposta

erro aplicar stilo SASS Botao.Vue

deu um erro apos inserir o scss no Botao.vue

ERROR in ./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-1f2780a1","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/shared/botao/Botao.vue
Module build failed: TypeError: this.getResolve is not a function
    at Object.loader (D:\Curso\vue\alurapic\node_modules\sass-loader\dist\index.js:52:26)
 @ ./node_modules/vue-style-loader!./node_modules/css-loader!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-1f2780a1","scoped":true,"hasInlineConfig":false}!./node_modules/sass-loader/dist/cjs.js!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./src/components/shared/botao/Botao.vue 4:14-352 13:3-17:5 14:22-360
 @ ./src/components/shared/botao/Botao.vue
 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/cadastro/Cadastro.vue
 @ ./src/components/cadastro/Cadastro.vue
 @ ./src/routes.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

codigo do CSS

<style scoped lang="scss">

$cor: firebrick;

.botao {
  display: inline-block;
  padding: 10px;
  border-radius: 3px;
  margin: 10px;
  font-size: 1.2em;
}

.botao-perigo {
  background: $cor;
  color: white;
}

.botao-padrao {
  background: darkcyan;
  color: white;
}

</style>
1 resposta

Fala ai Ivan, tudo bem? Você adicionou os loaders do SASS?

npm install node-sass@4.5.0 sass-loader@4.1.1 --save-dev

Espero ter ajudado.