refactor: add DesignIR distillation pipeline
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import type { NextConfig } from "next";
|
||||
import path from "node:path";
|
||||
|
||||
const appRoot = __dirname;
|
||||
const cadJsSrc = path.join(appRoot, "src", "viewer-cadjs");
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
allowedDevOrigins: ["127.0.0.1", "localhost"],
|
||||
transpilePackages: ["cadjs", "three", "three-mesh-bvh"],
|
||||
turbopack: {
|
||||
resolveAlias: {
|
||||
cadjs: "./src/viewer-cadjs",
|
||||
three: "./node_modules/three",
|
||||
"three/examples": "./node_modules/three/examples",
|
||||
"three-mesh-bvh": "./node_modules/three-mesh-bvh",
|
||||
gifenc: "./node_modules/gifenc/dist/gifenc.esm.js",
|
||||
},
|
||||
resolveExtensions: [".tsx", ".ts", ".jsx", ".js", ".mjs", ".json"],
|
||||
},
|
||||
webpack(config) {
|
||||
config.resolve = config.resolve || {};
|
||||
config.resolve.alias = {
|
||||
...(config.resolve.alias || {}),
|
||||
cadjs: cadJsSrc,
|
||||
three: path.join(appRoot, "node_modules", "three"),
|
||||
"three/examples": path.join(appRoot, "node_modules", "three", "examples"),
|
||||
"three-mesh-bvh": path.join(appRoot, "node_modules", "three-mesh-bvh"),
|
||||
gifenc: path.join(appRoot, "node_modules", "gifenc", "dist", "gifenc.esm.js"),
|
||||
};
|
||||
config.resolve.extensions = [
|
||||
...(config.resolve.extensions || []),
|
||||
".js",
|
||||
".mjs",
|
||||
];
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user