| import type { NextConfig } from 'next'; |
|
|
| const nextConfig: NextConfig = { |
| output: 'standalone', |
| devIndicators: false, |
| |
| serverExternalPackages: [ |
| 'quickjs-emscripten', |
| 'quickjs-emscripten-core', |
| '@jitl/quickjs-wasmfile-release-sync', |
| 'esbuild-wasm', |
| 'handlebars', |
| ], |
| eslint: { |
| ignoreDuringBuilds: true, |
| }, |
| typescript: { |
| |
| ignoreBuildErrors: false, |
| }, |
| webpack: (config, { isServer }) => { |
| config.watchOptions = { |
| ...config.watchOptions, |
| ignored: ['**/e2e/**', '**/test-results/**', '**/node_modules/**'], |
| }; |
| if (!isServer) { |
| config.resolve.alias = { |
| ...config.resolve.alias, |
| 'better-sqlite3': false, |
| }; |
| |
| config.resolve.fallback = { |
| ...config.resolve.fallback, |
| fs: false, |
| path: false, |
| crypto: false, |
| }; |
| } |
| return config; |
| }, |
| async headers() { |
| return [ |
| { |
| source: '/deployments/:path*', |
| headers: [ |
| { key: 'Cache-Control', value: 'public, max-age=3600' }, |
| ], |
| }, |
| ]; |
| }, |
| async rewrites() { |
| return [ |
| |
| |
| { |
| source: '/deployments/:projectId', |
| destination: '/deployments/:projectId/index.html', |
| }, |
| { |
| source: '/deployments/:projectId/', |
| destination: '/deployments/:projectId/index.html', |
| }, |
| |
| { |
| source: '/deployments/:projectId/:path([^.]+)', |
| destination: '/deployments/:projectId/:path.html', |
| }, |
| ]; |
| }, |
| }; |
|
|
| export default nextConfig; |
|
|