From ebf2b66910b9265976763e7cf211de383850c84f Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Thu, 20 Nov 2025 09:15:53 -0600 Subject: [PATCH] fix: configure Next.js to transpile @svg-maps ES modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- apps/web/next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/next.config.js b/apps/web/next.config.js index aa6f9992..9b6fa421 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -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,