webpack 编辑错误,菜鸟求解答
发布网友
发布时间:2022-05-23 15:07
我来回答
共1个回答
热心网友
时间:2023-10-26 14:13
const merge = require('webpack-merge');
const NpmInstallPlugin = require('npm-install-webpack-plugin');
const TARGET = process.env.npm_lifecycle_event;
const PATHS = {
app: path.join(__dirname, 'app'),
build: path.join(__dirname, 'build')
};
process.env.BABEL_ENV = TARGET;
//公共部分,设置入口,出口,模块
const common = {
entry: {
app: PATHS.app
},
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: PATHS.build,
filename: 'bundle.js'