Skip to content

Commit fda259a

Browse files
committed
define module resolution for consistent output
1 parent 3aa6561 commit fda259a

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

src/commands/build.ts

-14
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,6 @@ async function buildTypeScript(
8383
);
8484
}
8585

86-
if (Math.random()) {
87-
throw JSON.stringify(
88-
{
89-
project,
90-
tsconfig,
91-
moduleResolution,
92-
isModernNodeModuleResolution,
93-
isOldNodeModuleResolution,
94-
},
95-
null,
96-
' ',
97-
);
98-
}
99-
10086
async function build(out: PackageJsonType) {
10187
const revertPackageJsonsType = await setPackageJsonsType(
10288
{ cwd: options.cwd, ignore: [...filesToExcludeFromDist, ...(tsconfig?.exclude || [])] },

test/__fixtures__/simple-monorepo-pnpm/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"baseUrl": ".",
44
"outDir": "dist",
55
"target": "esnext",
6-
"module": "esnext",
6+
"module": "node16",
7+
"moduleResolution": "node16",
78
"lib": ["es6", "esnext", "es2015", "dom", "webworker"],
89
"declaration": true,
910
"strict": true,

test/__fixtures__/simple-monorepo/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"baseUrl": ".",
44
"outDir": "dist",
55
"target": "esnext",
6-
"module": "esnext",
6+
"module": "node16",
7+
"moduleResolution": "node16",
78
"lib": ["es6", "esnext", "es2015", "dom", "webworker"],
89
"declaration": true,
910
"strict": true,

0 commit comments

Comments
 (0)