Skip to content

Commit d43f97c

Browse files
committed
Revert "fix: cjs format should support alias for .d.ts file (#670)"
This reverts commit 3e6f78a.
1 parent 8e751da commit d43f97c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/light-crews-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ice/pkg': patch
3+
---
4+
5+
revert: #670 which is not fully tested

packages/pkg/src/helpers/getRollupOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function getRollupOptions(
8383
}),
8484
);
8585
}
86-
rollupOptions.plugins.unshift(transformAliasPlugin(rootDir, taskConfig.alias));
86+
rollupOptions.plugins.push(transformAliasPlugin(rootDir, taskConfig.alias));
8787
} else if (taskConfig.type === 'bundle') {
8888
const [external, globals] = getExternalsAndGlobals(taskConfig, pkg as PkgJson);
8989
rollupOptions.input = taskConfig.entry;

packages/pkg/tests/projects/__snapshots__/alias.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ _export(exports, {
108108
return _alias.bar;
109109
}
110110
});
111-
var _alias = require(\\"./alias.js\\");
111+
var _alias = require(\\"@/alias.js\\");
112112
var foo = 1;
113113
"
114114
`;

0 commit comments

Comments
 (0)