config.output.filename='[name].[chunkhash:8].js'
config.module.rules.push({
test:/\.styl/,
use:[
MiniCssExtractPlugin.loader,
"css-loader",
"postcss-loader",
"stylus-loader"
]
})
config.plugins.push(
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "[name].css",
chunkFilename: "[id].css"
})
)
用的是命令: npm run prod
https://github.com/fridaydream/vue-todo-example/tree/master