fix: configure Next.js to transpile @svg-maps ES modules
Add @svg-maps/world and @svg-maps/usa to transpilePackages array so Next.js can properly transpile these ES module packages for the server-side Node.js environment. This fixes the "Unexpected token 'export'" error in know-your-world Validator when the server tries to load map data via dynamic import. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
73cc4185c3
commit
ebf2b66910
|
|
@ -17,7 +17,7 @@ const nextConfig = {
|
|||
optimizePackageImports: ['@soroban/core', '@soroban/client'],
|
||||
serverComponentsExternalPackages: ['@myriaddreamin/typst.ts'],
|
||||
},
|
||||
transpilePackages: ['@soroban/core', '@soroban/client'],
|
||||
transpilePackages: ['@soroban/core', '@soroban/client', '@svg-maps/world', '@svg-maps/usa'],
|
||||
webpack: (config, { isServer }) => {
|
||||
config.experiments = {
|
||||
...config.experiments,
|
||||
|
|
|
|||
Loading…
Reference in New Issue