Skip to content

Commit

Permalink
fix: npm run build 시 오래 걸리는 문제 해결 (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleysyheo authored and waterricecake committed Sep 11, 2023
1 parent e15b3ca commit 4f42663
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"lint": "eslint src",
"cypress": "cypress open"
"cypress": "cypress open",
"analyze": "webpack-bundle-analyzer ./dist/bundle-report.json --default-sizes gzip"
},
"keywords": [],
"author": "",
Expand Down
9 changes: 8 additions & 1 deletion frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ const plugins = [
}),
new webpack.HotModuleReplacementPlugin(),
new Dotenv(),
new BundleAnalyzerPlugin(),
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
generateStatsFile: true,
statsFilename: 'bundle-report.json',
}),

new CompressionPlugin(),
];

Expand Down Expand Up @@ -97,6 +103,7 @@ module.exports = {
'@utils': path.resolve(__dirname, './src/utils'),
},
},

plugins,

optimization: {
Expand Down

0 comments on commit 4f42663

Please sign in to comment.