[Vuejs]-Load Stylus library and Global sheet with vue-loader and webpack2

0๐Ÿ‘

โœ…

As pointed by @Razvan Stoenescu, the following peice of code solved my problems. Thanks a lot.

module.exports = {
  ...
  rules: [
   ...      
  ],
  plugins: [
   ...
   new webpack.LoaderOptionsPlugin({
     minimize: env.prod,
    options: {
     context: path.resolve(__dirname, '../src'),
     ...
     stylus: {
        use: [
         require('jeet')(),
         require('rupture')()
        ],
        import: [
         path.resolve(__dirname, '../src/styles/index.styl')
        ]
      }
    }
  })
 ]
}

Leave a comment