Skip to content

Commit 16f14d0

Browse files
committed
f
1 parent 65bc70d commit 16f14d0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

resources/build-npm.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ async function buildPackage(outDir: string): Promise<void> {
9797
assert(match);
9898
const [, name, ext] = match;
9999

100-
if (prodFile === devHelper || ext === 'js.map') {
100+
if (ext === 'js.map') {
101+
continue;
102+
} else if (prodFile === devHelper) {
103+
packageJSON.exports['./dev'] = './dev/index.js';
101104
continue;
102105
}
103106

@@ -168,7 +171,7 @@ function emitTSFiles(options: {
168171
tsHost.writeFile = (filepath, body) => writeGeneratedFile(filepath, body);
169172

170173
const tsProgram = ts.createProgram(
171-
['src/index.ts', 'src/development.ts'],
174+
['src/index.ts', 'src/dev/index.ts'],
172175
tsOptions,
173176
tsHost,
174177
);

0 commit comments

Comments
 (0)