Spaces:
Running
Running
Download next.config.js from 2Btainment/Drip-Creator: direct link, hf CLI and curl.
- Browser
- Download file 1.27 kB
-
https://huggingface.co/spaces/2Btainment/Drip-Creator/resolve/main/next.config.js
- Command line
-
hf download hf://spaces/2Btainment/Drip-Creator/next.config.js
-
curl -L -o next.config.js https://huggingface.co/spaces/2Btainment/Drip-Creator/resolve/main/next.config.js
1.27 kB
| /** @type {import('next').NextConfig} */ | |
| const nextConfig = { | |
| reactStrictMode: true, | |
| swcMinify: true, | |
| // Standalone-Output für den HF-Space-Dockerfile-Runner | |
| output: 'standalone', | |
| // PWA Configuration | |
| headers: async () => [ | |
| { | |
| source: '/(.*)', | |
| headers: [ | |
| { | |
| key: 'Cross-Origin-Embedder-Policy', | |
| value: 'require-corp', | |
| }, | |
| { | |
| key: 'Cross-Origin-Opener-Policy', | |
| value: 'same-origin', | |
| }, | |
| ], | |
| }, | |
| ], | |
| // Webpack configuration for WASM support | |
| webpack: (config, { isServer }) => { | |
| // WASM-Dateien als Assets behandeln (Emscripten/onnxruntime lädt sie zur Laufzeit selbst) | |
| config.module.rules.unshift({ | |
| test: /\.wasm$/, | |
| type: 'asset/resource', | |
| }) | |
| // onnxruntime-Bundles enthalten import.meta, das Terser nicht minifizieren kann | |
| // → Minifizierung global deaktivieren (lokale App, Bundle-Größe zweitrangig) | |
| config.optimization.minimize = false | |
| // Ignore node-specific modules in client bundles | |
| if (!isServer) { | |
| config.resolve.fallback = { | |
| ...config.resolve.fallback, | |
| fs: false, | |
| path: false, | |
| crypto: false, | |
| } | |
| } | |
| return config | |
| }, | |
| } | |
| module.exports = nextConfig |