Files
cdsl-cad/frontend/next.config.ts
T
2026-08-19 19:34:30 +08:00

28 lines
776 B
TypeScript

import type { NextConfig } from "next";
import path from "node:path";
const root = __dirname;
const nextConfig: NextConfig = {
allowedDevOrigins: ["127.0.0.1", "localhost"],
transpilePackages: ["three", "three-mesh-bvh"],
webpack(config) {
config.resolve = config.resolve || {};
config.resolve.alias = {
...(config.resolve.alias || {}),
"@": path.join(root, "src"),
three: path.join(root, "node_modules", "three"),
"three/examples": path.join(root, "node_modules", "three", "examples"),
"three-mesh-bvh": path.join(root, "node_modules", "three-mesh-bvh"),
};
config.resolve.extensions = [
...(config.resolve.extensions || []),
".js",
".mjs",
];
return config;
},
};
export default nextConfig;