Module parse failed: Unexpected character '@' (1:0) vuejs , vuetify and vuex

Viewed 3854

getting error while adding/integrating Vuetify like.. import Vuetify from 'vuetify/lib' Vue.use(Vuetify) in main.js

Error:

ERROR in ./node_modules/vuetify/src/stylus/components/_grid.styl
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
| .    @import '../bootstrap'

main.js

import Vuetify from 'vuetify/lib'
Vue.use(Vuetify)
2 Answers

we need to configure loader in webpack (webpack.config.js or webpack.js or webpack.base.js) like

webpack.base.js

 .......other config

 module: {
   rules: [
       {
         test: /\.styl$/,
        loader: ['css-loader', 'stylus-loader']
      },

    .....other loaders
   ]
 }

 ....other config

to install loaders

 npm i stylus-loader  css-loader --save-dev

This is working on my side. you can add it on your roles.

{
        test: /\.styl$/,
        loader: ['style-loader', 'css-loader', 'stylus-loader']
},
Related