diff --git a/services/pascal-editor/apps/editor/next.config.ts b/services/pascal-editor/apps/editor/next.config.ts index 3e44232ff..7e7ede40c 100644 --- a/services/pascal-editor/apps/editor/next.config.ts +++ b/services/pascal-editor/apps/editor/next.config.ts @@ -5,6 +5,7 @@ import type { NextConfig } from 'next' const configuredBasePath = process.env.NEXT_PUBLIC_PASCAL_BASE_PATH?.trim() ?? '' const basePath = configuredBasePath ? `/${configuredBasePath.replace(/^\/+|\/+$/g, '')}` : undefined const pascalRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..') +const workspaceModule = (name: string) => path.resolve(pascalRoot, 'node_modules', name) const nextConfig: NextConfig = { basePath, @@ -33,6 +34,16 @@ const nextConfig: NextConfig = { '@react-three/drei': './node_modules/@react-three/drei', }, }, + webpack: (config) => { + config.resolve.alias = { + ...config.resolve.alias, + 'react$': workspaceModule('react'), + 'three$': workspaceModule('three'), + '@react-three/fiber$': workspaceModule('@react-three/fiber'), + '@react-three/drei$': workspaceModule('@react-three/drei'), + } + return config + }, experimental: { serverActions: { bodySizeLimit: '100mb',