Skip to content

Commit 9e37074

Browse files
author
winjo
committed
fix(alex): 修复 polyfills 导出问题
1 parent 972160c commit 9e37074

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/alex/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"modules",
1414
"languages",
1515
"shims",
16+
"polyfills",
1617
"bundle",
1718
"typings"
1819
],

scripts/utils/generate-alias.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ export * from "../lib/modules/${scope}__${name}";
6464
};
6565

6666
exports.generateShims = async () => {
67-
// 暴露内置的 shims,如引用 lib,可使用此文件夹下的 polyfill
67+
const polyfillsDir = path.join(__dirname, '../../packages/alex/polyfills');
68+
await fse.remove(polyfillsDir);
69+
await fse.ensureDir(polyfillsDir);
70+
await fse.copy(path.join(__dirname, '../../packages/toolkit/polyfill'), polyfillsDir);
71+
6872
const shimsDir = path.join(__dirname, '../../packages/alex/shims');
6973
await fse.remove(shimsDir);
7074
await fse.ensureDir(shimsDir);

0 commit comments

Comments
 (0)