Variables don't work in nuxt.js
flexscss opened this issue · comments
Alexey commented
EGOIST commented
Please provide a full repro.
arthur diniz commented
I'm with the same problem (i'm using nuxt as well)
style: css`
.container2 {
background-color: ${vm => vm.backgroundColor};
}
`,
data() {
return {
backgroundColor: 'red'
}
},
but the browser just put a
background-color: var(--v0);
I've tried the example that is on the documentation and it doesn't work either. Also the Preprocessors doesn't work (I have sass-loader and node-sass installed):
ERROR in ./pages/teste.vue
Module Error (from ./node_modules/eslint-loader/index.js):
/home/arthurvdiniz/dev/sites/acervus-publico/pages/teste.vue
9:10 error scss not found in 'styled-vue' import/named
✖ 1 problem (1 error, 0 warnings)
Alexander Jank commented
@egoist Same thing here. Preprocessors won't work.
Christoph Wolff commented
Works fine for me. With css and scss.
Sample Repo here: https://github.com/christophwolff/nuxt-styled-vue-sample