diff --git a/apps/fronted/next.config.mjs b/apps/fronted/next.config.mjs index b149e34..99d2360 100644 --- a/apps/fronted/next.config.mjs +++ b/apps/fronted/next.config.mjs @@ -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"] } };