在16章第4节课使用webpack4 + vue-loader 打包时出错,报错不太明显,请老师看看
来源:16-4 webpack打包功能实现(上)
慕后端5202000
2018-05-23
主要是webpack.config.js 中vue-loader + scss-loader 位置 不知如何写
写回答
1回答
-
慕后端5202000
提问者
2018-05-23
const path = require('path') const VueLoaderPlugin = require('vue-loader/lib/plugin') module.exports = { entry: './src/lib/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'vue-toast.js' }, mode: 'development', module: { rules: [ { test: /\.vue$/, include: path.resolve(__dirname, 'src'), use: [ 'vue-loader' ] }, { test: /\.js$/, include: path.resolve(__dirname, 'src'), use: [ 'babel-loader' ] }, { test: /\.scss$/, use: [ 'vue-style-loader', 'css-loader', 'sass-loader' ] } ] }, plugins: [ new VueLoaderPlugin() ] }
已解决
20
相似问题