mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
fix(cli): should compile es/index.js
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user