Download next.config.js from matthoffner/chat-with-internet: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/spaces/matthoffner/chat-with-internet/resolve/901ce1c50bfed9bc7bef1cb56738cbe771d32adb/next.config.js
- Command line
-
hf download hf://spaces/matthoffner/chat-with-internet@901ce1c50bfed9bc7bef1cb56738cbe771d32adb/next.config.js
-
curl -L -o next.config.js https://huggingface.co/spaces/matthoffner/chat-with-internet/resolve/901ce1c50bfed9bc7bef1cb56738cbe771d32adb/next.config.js
1.31 kB
| const CopyPlugin = require('copy-webpack-plugin'); | |
| /** @type {import('next').NextConfig} */ | |
| const nextConfig = { | |
| output: "standalone", | |
| // Custom Webpack configuration | |
| webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => { | |
| // Add the node-loader for handling .node files | |
| config.module.rules.push({ | |
| test: /\.node$/, | |
| loader: 'node-loader', | |
| }); | |
| // Add CopyPlugin to copy VAD assets | |
| config.plugins.push( | |
| new CopyPlugin({ | |
| patterns: [ | |
| { | |
| from: "node_modules/@ricky0123/vad-web/dist/vad.worklet.bundle.min.js", | |
| to: "static/chunks/[name][ext]", // Adjusted path | |
| }, | |
| { | |
| from: "node_modules/@ricky0123/vad-web/dist/*.onnx", | |
| to: "static/chunks/[name][ext]", // Adjusted path | |
| }, | |
| { | |
| from: "node_modules/onnxruntime-web/dist/*.wasm", | |
| to: "static/chunks/[name][ext]" // Adjusted path | |
| }, | |
| ], | |
| }) | |
| ); | |
| // Return the modified config | |
| return config; | |
| }, | |
| } | |
| module.exports = nextConfig; | |