Skip to content

Commit

Permalink
feat: next bundle 분석 코드 추가 및 ui 트리쉐이킹 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
ksmfou98 committed Oct 17, 2023
1 parent b37a5de commit 2caf462
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 3 deletions.
140 changes: 140 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion apps/jurumarble/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
console.log("START");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});

/** @type {import('next').NextConfig} */
const nextConfig = {
swcMinify: true,
Expand Down Expand Up @@ -27,4 +31,9 @@ const nextConfig = {
},
};

module.exports = nextConfig;
module.exports = (_phase) => {
const plugins = [withBundleAnalyzer];
return plugins.reduce((acc, plugin) => plugin(acc), {
...nextConfig,
});
};
2 changes: 2 additions & 0 deletions apps/jurumarble/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"analyze": "ANALYZE=true yarn build",
"start": "next start",
"lint": "next lint",
"gen": "svgr --index-template src/assets/icons/templates/indexTemplate.cjs --config-file src/assets/icons/config/basic.config.cjs",
Expand All @@ -15,6 +16,7 @@
"@emotion/is-prop-valid": "^1.2.1",
"@monorepo/hooks": "workspace:*",
"@monorepo/ui": "workspace:*",
"@next/bundle-analyzer": "13.3.5-canary.9",
"@react-hookz/web": "^23.1.0",
"@tanstack/react-query": "^4.33.0",
"@tanstack/react-query-devtools": "^4.33.0",
Expand Down
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"packageManager": "yarn@3.3.0",
"version": "0.1.0",
"description": "",
"sideEffects": false,
"main": "index.ts",
"author": "",
"license": "ISC",
Expand Down
Loading

0 comments on commit 2caf462

Please sign in to comment.