Skip to content

Commit 50860cc

Browse files
authored
Merge pull request #184 from MeshJS/bug/loading-issue
Bug/loading issue
2 parents dcc81f7 + f995253 commit 50860cc

File tree

81 files changed

+3919
-1269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+3919
-1269
lines changed

SECURITY_VULNERABILITIES_ANALYSIS.md

Lines changed: 0 additions & 205 deletions
This file was deleted.

next.config.js

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const config = {
1919
locales: ["en"],
2020
defaultLocale: "en",
2121
},
22-
transpilePackages: ["geist"],
22+
transpilePackages: ["geist", "@meshsdk/react"],
2323
typescript: {
2424
// Warning: This allows production builds to successfully complete even if
2525
// your project has type errors.
@@ -44,6 +44,8 @@ const config = {
4444
hostname: "gateway.pinata.cloud",
4545
},
4646
],
47+
// Allow unoptimized images for local proxy API routes
48+
unoptimized: false,
4749
},
4850
// Turbopack configuration (Next.js 16+)
4951
// Empty config silences the warning about webpack/turbopack conflict
@@ -56,8 +58,35 @@ const config = {
5658
asyncWebAssembly: true,
5759
layers: true,
5860
};
61+
62+
// Optimize tree-shaking by ensuring proper module resolution
63+
config.optimization = {
64+
...config.optimization,
65+
usedExports: true,
66+
sideEffects: false,
67+
};
68+
69+
// Handle CommonJS modules that don't support named exports
70+
config.resolve = {
71+
...config.resolve,
72+
extensionAlias: {
73+
".js": [".js", ".ts", ".tsx"],
74+
},
75+
};
76+
5977
return config;
6078
},
79+
80+
// External packages for server components to avoid bundling issues
81+
serverExternalPackages: ["@fabianbormann/cardano-peer-connect"],
6182
};
6283

63-
export default config;
84+
// Bundle analyzer - only enable when ANALYZE env var is set
85+
/** @type {(config: import("next").NextConfig) => import("next").NextConfig} */
86+
const withBundleAnalyzer = process.env.ANALYZE === 'true'
87+
? require('@next/bundle-analyzer')({
88+
enabled: true,
89+
})
90+
: (config) => config;
91+
92+
export default withBundleAnalyzer(config);

0 commit comments

Comments
 (0)