webpack配置postcss-loader无效
文档配置如下:
postcss.config.js
module.exports = {
plugins: [
require('autoprefixer')
]
}
webpack.config.js
const path = require('path');
const webpack = require('webpack');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
index: './src/index/index.js',
demo: './src/demo/demo.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name]-[hash].js',
},
plugins: [
new webpack.BannerPlugin('版权所有,翻版必究'),
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
}),
new CleanWebpackP