vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.88k stars 1.16k forks source link

Can't find scss #2172

Closed fredaas closed 4 years ago

fredaas commented 4 years ago

The component is initialized like this in main.js:

import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.min.css'
import 'vue-material/dist/theme/default.css'

Vue.use(VueMaterial)

Trying to configure a theme in App.vue like described in the docs

@import "~vue-material/dist/theme/engine";

@include md-register-theme("default", (
  primary: md-get-palette-color(blue, A200)
));

@import "~vue-material/dist/theme/all";

yields the following error:

Module not found: Error: Can't resolve 'vue-material/dist/theme/all' in '~/Desktop/dev/nice-ui/src'

Sass support is enabled.

Any help would be much appreciated.

fredaas commented 4 years ago

This was resolved by doing

npm install node-sass sass-loader --save-dev

and using style="scss" in the style tag.

Also, I had to remove the following line from main.js:

import 'vue-material/dist/theme/default.css'

If not, the custom theme gets overridden by the default.