Commit d0c8732b authored by devjiwonchoi's avatar devjiwonchoi

extract mts support

parent 97264672
......@@ -148,7 +148,7 @@ export async function transpileConfig({
pkgJson = JSON.parse(await readFile(join(cwd, 'package.json'), 'utf8'))
} catch {}
if (configFileName.endsWith('.mts') || pkgJson.type === 'module') {
if (pkgJson.type === 'module') {
return handleESM({ cwd, compilerOptions, nextConfigPath, phase })
}
......
......@@ -1389,9 +1389,7 @@ export default async function loadConfig(
let userConfigModule: any
try {
const envBefore = Object.assign({}, process.env)
const shouldTranspile =
configFileName === 'next.config.ts' ||
configFileName === 'next.config.mts'
const shouldTranspile = configFileName === 'next.config.ts'
// `import()` expects url-encoded strings, so the path must be properly
// escaped and (especially on Windows) absolute paths must pe prefixed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment