diff --git a/next.config.js b/next.config.js deleted file mode 100644 index 591435d..0000000 --- a/next.config.js +++ /dev/null @@ -1,12 +0,0 @@ -const { PHASE_EXPORT, PHASE_PRODUCTION_BUILD } = require("next/constants"); - -module.exports = (phase, { defaultConfig }) => { - if (phase === PHASE_EXPORT || phase === PHASE_PRODUCTION_BUILD) { - return { - output: "export", - basePath: "/vanjs.github.io", - }; - } - - return {}; -}; diff --git a/next.config.mjs b/next.config.mjs new file mode 100644 index 0000000..684d175 --- /dev/null +++ b/next.config.mjs @@ -0,0 +1,19 @@ +// /** @type {import('next').NextConfig} */ +// const nextConfig = { +// output: "export", +// basePath: "/vanjs.github.io", +// }; + +// export default nextConfig; + +export default (phase, { defaultConfig }) => { + /** + * @type {import('next').NextConfig} + */ + + const nextConfig = { + basePath: phase !== "phase-development-server" ? "/vanjs.github.io" : "", + }; + + return nextConfig; +};