vue+wepack extract-text-webpack-plugin 丢失问题解决
在webpack.base.conf.js文件下
添加
const ExtractTextPlugin = require('extract-text-webpack-plugin'); const extractCSS = new ExtractTextPlugin('stylesheets/[name]-one.css'); const extractLESS = new ExtractTextPlugin('stylesheets/[name]-two.css');
module: { rules: [ { test: /\.css$/, use: extractCSS.extract(['css-loader', 'postcss-loader']) }, { test: /\.less$/i, use: extractLESS.extract(['css-loader', 'less-loader']) } ] }, plugins: [ extractCSS, extractLESS ]