Skip to content

Commit

Permalink
fix: add NO_MINIFY option for webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 10, 2024
1 parent d9364a8 commit 7117914
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/staking/app/mystakes/modules/StakedNodesModule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function StakedNodesWithAddress({ address }: { address: Address }) {
}

return [
data.stakes.concat(data.historical_stakes),
[...data.stakes, ...data.historical_stakes],
data.network.block_height,
data.network.block_timestamp,
];
Expand Down
6 changes: 6 additions & 0 deletions apps/staking/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ const nextConfig = {
},
webpack: (config) => {
config.externals.push('pino-pretty', 'lokijs', 'encoding');
const noMinify = process.env.NO_MINIFY === 'true';
if (noMinify) {
config.optimization = {
minimize: false,
};
}
return config;
},
redirects: async () => {
Expand Down
1 change: 1 addition & 0 deletions apps/staking/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",
"build:large": "NO_MINIFY=true next build",
"start": "next start",
"check-types": "tsc --noEmit",
"check-telemetry": "next telemetry",
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
".env.local"
],
"env": [
"NO_MINIFY",
"NEXT_PUBLIC_SENT_STAKING_API_URL",
"NEXT_PUBLIC_SENT_EXPLORER_API_URL",
"NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID",
Expand Down

0 comments on commit 7117914

Please sign in to comment.