J
J
jeruthadam2017-08-23 17:28:30
JavaScript
jeruthadam, 2017-08-23 17:28:30

Why is scss not imported from node_modules by webpack?

Webpack once again breaks the brain.
Installed @material/checkbox
Trying to do

<style lang="scss">
@import '@material/checkbox/mdc-checkbox';
</style>

I am using vue cli webpack starter.
Throws an error
in ./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-563a1fd0","scoped":false,"hasInlineConfig":false}!./~/sass-loader/lib/loader.js?{"sourceMap":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Checkbox.vue
Module build failed: 
@import '@material/checkbox/mdc-checkbox';
^
      File to import not found or unreadable: @material/checkbox/mdc-checkbox.
Parent style sheet: stdin
      in /home/nman/Documents/WORK/frontend-dev/mdc-vue-integration/src/components/Checkbox.vue (line 72, column 1)
 @ ./~/vue-style-loader!./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-563a1fd0","scoped":false,"hasInlineConfig":false}!./~/sass-loader/lib/loader.js?{"sourceMap":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/components/Checkbox.vue 4:14-397 13:3-17:5 14:22-405
 @ ./src/components/Checkbox.vue
 @ ./src/router/index.js
 @ ./src/main.js
 @ multi ./build/dev-client ./src/main.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2017-08-25
@LiguidCool

As far as I remember, when initializing the template, he asks whether to use SASS.
Smoke towards webpack settings and vue-loader in particular. For example a similar problem .
Maybe not @ , but ~ ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question