Skip to content

Commit

Permalink
Update webpack.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
masx200 committed Jun 17, 2023
1 parent 72dc40c commit b7d3c16
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const {
} = require("@masx200/webpack-react-vue-spa-awesome-config");

module.exports = (env, argv) => {
const config = createconfig(env, argv);
const webpackconfig = config;
const webpackconfig = createconfig(env, argv);

if ("production" === process.env.NODE_ENV) {
webpackconfig.entry = [
require.resolve("@masx200/ie11-usual-polyfills"),
Expand All @@ -17,7 +17,10 @@ module.exports = (env, argv) => {
// webpackconfig.devtool = "source-map";
}
if (process.env.NODE_ENV == "development") {
config.experiments = { ...config.experiments, lazyCompilation: true };
webpackconfig.experiments = {
...webpackconfig.experiments,
lazyCompilation: true,
};
}
//console.log(webpackconfig.resolve);
webpackconfig.resolve = Object.assign(webpackconfig.resolve, {
Expand Down

1 comment on commit b7d3c16

@vercel
Copy link

@vercel vercel bot commented on b7d3c16 Jun 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.