This commit is contained in:
2026-06-06 10:15:53 -04:00
parent 71d7a9d6f0
commit 78220d3568
11 changed files with 1315 additions and 335 deletions

View File

@@ -2,13 +2,23 @@ import type { NextConfig } from "next";
const nextConfig: NextConfig = {
// Turbopack config (Next.js 16 default)
turbopack: {},
turbopack: {
resolveAlias: {
// Optional ML backends — not installed, dynamic import fallback to mock
"@tensorflow/tfjs": "./src/stubs/empty.ts",
"@tensorflow/tfjs-node": "./src/stubs/empty.ts",
"onnxruntime-node": "./src/stubs/empty.ts",
},
},
// Webpack config (fallback)
webpack: (config) => {
config.resolve.alias = {
...config.resolve.alias,
sharp: false,
"detect-libc": false,
"@tensorflow/tfjs": false,
"@tensorflow/tfjs-node": false,
"onnxruntime-node": false,
};
return config;
},