diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index 148a6b4133a70..cc8cc686b60d8 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -235,6 +235,17 @@ const config = { maxRetries: 5, }), ) + if (!isServer) { + webpackConfig.optimization.minimizer = [ + new webpack.optimize.MinimizePlugin(), + new TerserPlugin({ + parallel: true, + terserOptions: { + compress: true, + }, + }), + ] + } if (!isServer && webpackConfig.optimization.splitChunks) { // webpack doesn't understand worker deps on quote worker, so we need to manually add them // https://github.com/webpack/webpack/issues/16895 diff --git a/package.json b/package.json index 222bdf7630a10..60885205fec6b 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,13 @@ "dev:gamification": "pnpm turbo run dev --filter=gamification... --concurrency=50", "storybook": "turbo run start --filter=@pancakeswap/uikit...", "build:storybook": "turbo run build:storybook --filter=@pancakeswap/uikit...", - "build": "turbo run build --filter=web...", - "build:blog": "turbo run build --filter=blog...", - "build:aptos": "turbo run build --filter=aptos-web...", - "build:bridge": "turbo run build --filter=bridge...", - "build:games": "turbo run build --filter=games...", - "build:packages": "turbo run build --filter=./packages/* --filter=./packages/routing-sdk/addons/*", - "build:gamification": "turbo run build --filter=gamification...", + "build": "turbo run build --filter=web... --concurrency=50", + "build:blog": "turbo run build --filter=blog... --concurrency=50", + "build:aptos": "turbo run build --filter=aptos-web... --concurrency=50", + "build:bridge": "turbo run build --filter=bridge... --concurrency=50", + "build:games": "turbo run build --filter=games... --concurrency=50", + "build:packages": "turbo run build --filter=./packages/* --filter=./packages/routing-sdk/addons/* --concurrency=50", + "build:gamification": "turbo run build --filter=gamification... --concurrency=50", "start": "turbo run start --filter=web", "test:config": "pnpm turbo run test:config --filter=web...[HEAD^1]", "test:ci": "pnpm turbo run test --filter=[HEAD^1]", @@ -39,7 +39,7 @@ "updateLPsAPR": "pnpm turbo run build --filter=@pancakeswap/farms && NODE_PATH=./apps/web/src tsx --tsconfig ./apps/web/tsconfig.json scripts/updateLPsAPR.ts", "updateAptosLPsAPR": "pnpm turbo run build --filter=@pancakeswap/aptos-swap-sdk && NODE_PATH=./apps/aptos/src tsx --tsconfig ./apps/aptos/tsconfig.json scripts/updateAptosLpsAPR/index.ts", "updateMerkl": "NODE_PATH=./apps/web/src tsx --tsconfig ./apps/web/tsconfig.json scripts/updateMerkl/index.ts", - "clean": "turbo run clean && rm -rf node_modules", + "clean": "turbo run clean && rm -rf node_modules --concurrency=50", "changeset": "changeset", "version-packages": "changeset version && pnpm i --lockfile-only", "release-packages": "turbo run build --filter=./packages/* && changeset version && changeset publish",