生产环境配置
独立的配置文件
yarn add -D webpack-mergeconst HtmlWebpackPlugin = require('html-webpack-plugin')
const path = require('path')
module.exports = {
entry: {
app: './src/index.js'
},
output: {
filename: '[name].[hash:10].js',
path: path.resolve(__dirname, 'dist'),
clean: true
},
plugins: [
new HtmlWebpackPlugin({
title: 'Webpack'
})
]
}Last updated