node build fixed
This commit is contained in:
25
seanime-2.9.10/seanime-web/next.config.js
Normal file
25
seanime-2.9.10/seanime-web/next.config.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const isProd = process.env.NODE_ENV === 'production';
|
||||
const isDesktop = process.env.NEXT_PUBLIC_PLATFORM === 'desktop';
|
||||
const isTauriDesktop = process.env.NEXT_PUBLIC_DESKTOP === 'tauri';
|
||||
const isElectronDesktop = process.env.NEXT_PUBLIC_DESKTOP === 'electron';
|
||||
const internalHost = process.env.TAURI_DEV_HOST || '127.0.0.1';
|
||||
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
...(isProd && {output: "export"}),
|
||||
distDir: isDesktop ? (isElectronDesktop ? "out-denshi" : "out-desktop") : undefined,
|
||||
cleanDistDir: true,
|
||||
reactStrictMode: false,
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
transpilePackages: ["@uiw/react-textarea-code-editor", "@replit/codemirror-vscode-keymap", "media-chrome", "anime4k-webgpu"],
|
||||
assetPrefix: isProd ? undefined : (isDesktop ? `http://${internalHost}:43210` : undefined),
|
||||
experimental: {
|
||||
reactCompiler: true,
|
||||
},
|
||||
devIndicators: false,
|
||||
}
|
||||
|
||||
module.exports = nextConfig
|
||||
Reference in New Issue
Block a user