build(@vant/lazyload): using rollup to bundle (#9598)

This commit is contained in:
neverland
2021-09-30 11:19:38 +08:00
committed by GitHub
parent 75958887c2
commit 091b5c7ff8
5 changed files with 146 additions and 1041 deletions
+2 -3
View File
@@ -9,8 +9,8 @@ const srcFiles = glob.sync(join(srcDir, '**', '*.ts'), {
ignore: ['**/node_modules', '**/*.spec.ts'],
});
const compile = (filePath, distDir) => {
return new Promise((resolve, reject) => {
const compile = (filePath, distDir) =>
new Promise((resolve, reject) => {
const code = readFileSync(filePath, 'utf-8');
const distPath = filePath.replace(srcDir, distDir).replace('.ts', '.js');
@@ -23,7 +23,6 @@ const compile = (filePath, distDir) => {
})
.catch(reject);
});
};
async function build() {
// esm output