mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-07 08:26:51 +00:00
Workspace packages (@roo-code/types, @roo-code/ipc, @roo-code/cloud) use NodeNext module resolution with .js extensions in TypeScript imports. Without proper bundler config, these resolve to literal .js files instead of the actual .ts source files, causing "Module not found" errors. - Add turbopack.root pointing to monorepo root (matching web-roo-code) - Add webpack resolve.extensionAlias to map .js -> .ts/.tsx for builds Fixes #11853
20 lines
522 B
TypeScript
20 lines
522 B
TypeScript
import path from "path"
|
|
import type { NextConfig } from "next"
|
|
|
|
const nextConfig: NextConfig = {
|
|
turbopack: {
|
|
root: path.join(__dirname, "../.."),
|
|
},
|
|
webpack: (config) => {
|
|
// Enable .js -> .ts/.tsx resolution for workspace packages using NodeNext
|
|
// module resolution (e.g. @roo-code/types, @roo-code/ipc, @roo-code/cloud)
|
|
config.resolve.extensionAlias = {
|
|
".js": [".ts", ".tsx", ".js", ".jsx"],
|
|
".mjs": [".mts", ".mjs"],
|
|
".cjs": [".cts", ".cjs"],
|
|
}
|
|
return config
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|