mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(cli): should compile es/index.js
This commit is contained in:
parent
f68a1f2512
commit
be0e44904f
@ -147,13 +147,15 @@ async function buildPackageEntry() {
|
|||||||
pathResolver: (path: string) => `./${relative(SRC_DIR, path)}`
|
pathResolver: (path: string) => `./${relative(SRC_DIR, path)}`
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setModuleEnv('esmodule');
|
||||||
|
await compileJs(esEntryFile, { reloadConfig: true });
|
||||||
|
|
||||||
genPacakgeStyle({
|
genPacakgeStyle({
|
||||||
outputPath: styleEntryFile,
|
outputPath: styleEntryFile,
|
||||||
pathResolver: (path: string) => path.replace(SRC_DIR, '.')
|
pathResolver: (path: string) => path.replace(SRC_DIR, '.')
|
||||||
});
|
});
|
||||||
|
|
||||||
setModuleEnv('commonjs');
|
setModuleEnv('commonjs');
|
||||||
|
|
||||||
await copy(esEntryFile, libEntryFile);
|
await copy(esEntryFile, libEntryFile);
|
||||||
await compileJs(libEntryFile, { reloadConfig: true });
|
await compileJs(libEntryFile, { reloadConfig: true });
|
||||||
await compileStyle(styleEntryFile);
|
await compileStyle(styleEntryFile);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user