re-init
This commit is contained in:
39
next.config.ts
Normal file
39
next.config.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
// Allow remote images from Wikimedia Commons
|
||||
images: {
|
||||
remotePatterns: [
|
||||
{
|
||||
protocol: "https",
|
||||
hostname: "upload.wikimedia.org",
|
||||
port: "",
|
||||
pathname: "/wikipedia/commons/**",
|
||||
search: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
// Turbopack config (Next.js 16 default)
|
||||
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;
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in New Issue
Block a user