Commit 66ca7939 authored by devjiwonchoi's avatar devjiwonchoi

Revert "Revert "test: need allowImportingTsExtensions""

This reverts commit 726e402decfcde62e7e77b95c0ed30ec04276e93.
parent 8d75e603
import type { NextConfig } from 'next' import type { NextConfig } from 'next'
const nextConfig = async () => { const nextConfig = async () => {
const { foo } = await import('./foo') const { foo } = await import('./foo.ts')
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
env: { env: {
......
{
"compilerOptions": {
"allowImportingTsExtensions": true
}
}
...@@ -3,6 +3,7 @@ import fs from 'node:fs' ...@@ -3,6 +3,7 @@ import fs from 'node:fs'
import { dirname, join } from 'node:path' import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
// import.meta.url only works in ESM
const __filename = fileURLToPath(import.meta.url) const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename) const __dirname = dirname(__filename)
......
import type { NextConfig } from 'next' import type { NextConfig } from 'next'
import { getFoo } from './get-foo' import { getFoo } from './get-foo.ts'
const foo = await getFoo() const foo = await getFoo()
......
{
"compilerOptions": {
"allowImportingTsExtensions": true
}
}
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