Files
67468f98c4 Add support for tsconfig 'nodenext' | 'node16' (#44177)
## ESM: support module option for tsconfig.json 

- fixes #37525
- fixes #41961

With [TypeScript 4.7 providing ECMAScript Module Support](https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/#ecmascript-module-support-in-node-js), we can now set this in our tsconfig.json file for the [module](https://www.typescriptlang.org/tsconfig#module) option.

Webpack added "extensionAlias" to solve importing ts files with .js extension -> https://github.com/webpack/enhanced-resolve/pull/351



Co-authored-by: JJ Kasper <[email protected]>
2023-01-28 16:17:40 +00:00

10 lines
284 B
JavaScript

// import tsx file with .js extension alias, this leads to a build fail if extensionAlias is not configured
import { TsxComponent } from '../components/TsxComponent.js'
export default function PageWithImport() {
return (
<>
See import here: <TsxComponent />
</>
)
}