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
]

 

posted on 2018-05-08 10:26  ksunone  阅读(272)  评论(0编辑  收藏  举报

导航