Skip to content

Commit

Permalink
Use bundler module resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
billyjanitsch committed Sep 19, 2023
1 parent 7850bcc commit 4b8dec6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions fixtures/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
4 changes: 3 additions & 1 deletion fixtures/react.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import {useState} from 'react'

import {double} from './utils'

interface FooProps {
num: number
str: string
Expand All @@ -11,7 +13,7 @@ export default function Foo(props: FooProps): JSX.Element {
return (
<div>
{count}
{num}
{double(num)}
{str}
</div>
)
Expand Down
3 changes: 3 additions & 0 deletions fixtures/utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function double(n: number): number {
return n * 2
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"incremental": true,
"isolatedModules": true,
"jsx": "react-jsx",
"module": "node16",
"moduleResolution": "node16",
"module": "ES2022",
"moduleResolution": "bundler",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"strict": true,
Expand Down

0 comments on commit 4b8dec6

Please sign in to comment.