Unverified Commit 1d4017ea authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

Remove force writing **/*.mts to tsconfig (#83967)

It was added at https://github.com/vercel/next.js/pull/83556. We don't
force writing `**/*.tsx` or `**/*.ts` to tsconfig, but forcing
`**/*.mts` is too harsh, when its intention was to support
`next.config.mts`. Just for the empty tsconfig or empty include was
enough.
parent 92f23dae
...@@ -176,7 +176,7 @@ describe('writeConfigurationDefaults()', () => { ...@@ -176,7 +176,7 @@ describe('writeConfigurationDefaults()', () => {
}) })
it('should replace includes when base is missing appTypes', async () => { it('should replace includes when base is missing appTypes', async () => {
const include = ['**/*.ts', '**/*.tsx'] const include = ['**/*.ts', '**/*.tsx', '**/*.mts']
const content = { extends: './tsconfig.base.json' } const content = { extends: './tsconfig.base.json' }
const baseContent = { include } const baseContent = { include }
......
...@@ -228,9 +228,6 @@ export async function writeConfigurationDefaults( ...@@ -228,9 +228,6 @@ export async function writeConfigurationDefaults(
if (!rawConfig.include.includes(nextAppTypes)) { if (!rawConfig.include.includes(nextAppTypes)) {
missingFromResolved.push(nextAppTypes) missingFromResolved.push(nextAppTypes)
} }
if (!rawConfig.include.includes('**/*.mts')) {
missingFromResolved.push('**/*.mts')
}
if (missingFromResolved.length > 0) { if (missingFromResolved.length > 0) {
if (!Array.isArray(userTsConfig.include)) { if (!Array.isArray(userTsConfig.include)) {
......
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