Merge pull request #23 from JOYCEQL/feat/workbench

Feat/workbench
This commit is contained in:
qingchen
2024-11-25 20:53:00 +08:00
committed by GitHub
+18 -1
View File
@@ -1,10 +1,27 @@
/** @type {import('next').NextConfig} */
import { fileURLToPath } from "url";
import { dirname } from "path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
const nextConfig = {
typescript: {
ignoreBuildErrors: true
},
// serverRuntimeConfig: {
// chromePath: process.env.CHROME_PATH
// },
serverRuntimeConfig: {
chromePath: process.env.CHROME_PATH
PROJECT_ROOT: __dirname
},
webpack: (config, { isServer }) => {
if (isServer) {
config.externals.push("_http_common");
}
return config;
},
experimental: {
serverComponentsExternalPackages: ["puppeteer-core"]
}
};