Skip to content

Commit

Permalink
fix(types): handle module: "nodenext" in tsconfig.json
Browse files Browse the repository at this point in the history
closes #77
  • Loading branch information
privatenumber committed Jul 29, 2024
1 parent ef6265c commit 838c689
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/get-rollup-configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const getConfig = {
compilerOptions: {
composite: false,
preserveSymlinks: false,
module: ts.default.ModuleKind.Preserve,
moduleResolution: ts.default.ModuleResolutionKind.Bundler,
},
}) as Plugin,
Expand Down
2 changes: 2 additions & 0 deletions tests/specs/builds/output-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export default testSuite(({ describe }, nodePath: string) => {
}),
'tsconfig.json': createTsconfigJson({
compilerOptions: {
// Check that it handles different module types
module: 'NodeNext',
typeRoots: [
path.resolve('node_modules/@types'),
],
Expand Down

0 comments on commit 838c689

Please sign in to comment.