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:
Thomas Hallock 2025-11-20 09:15:53 -06:00
parent 73cc4185c3
commit ebf2b66910
1 changed files with 1 additions and 1 deletions

View File

@ -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,