加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.config.dev.js 815 Bytes
一键复制 编辑 原始数据 按行查看 历史
Tom Moor 提交于 2021-04-22 18:59 . chore: Faster source map in dev
/* eslint-disable */
const webpack = require("webpack");
const commonWebpackConfig = require("./webpack.config");
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
const isTest = process.env.NODE_ENV === "test";
const developmentWebpackConfig = Object.assign(commonWebpackConfig, {
cache: true,
mode: "development",
devtool: "eval-cheap-module-source-map",
entry: [
"webpack-hot-middleware/client",
"./app/index",
],
optimization: {
usedExports: true,
},
});
if (!isTest) {
developmentWebpackConfig.plugins = [
...developmentWebpackConfig.plugins,
new webpack.HotModuleReplacementPlugin(),
new ReactRefreshWebpackPlugin({
overlay: {
sockIntegration: 'whm',
},
}),
];
}
module.exports = developmentWebpackConfig;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化