mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-06 20:49:46 +08:00
[bugfix] Build: should use babel sync compile (#885)
This commit is contained in:
parent
e1294cd1e0
commit
602f8e0b50
@ -46,13 +46,8 @@ function compile(dir, jsOnly = false) {
|
||||
|
||||
fs.outputFileSync(output, compiler(source, compilerOption).js);
|
||||
} else if (/\.js$/.test(file)) {
|
||||
babel.transformFile(
|
||||
absolutePath,
|
||||
compilerOption.babel,
|
||||
(err, { code }) => {
|
||||
fs.outputFileSync(absolutePath, code);
|
||||
}
|
||||
);
|
||||
const { code } = babel.transformFileSync(absolutePath, compilerOption.babel);
|
||||
fs.outputFileSync(absolutePath, code);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user