feat(cli): add build-site command
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import webpack from 'webpack';
|
||||
import { packageConfig } from '../config/webpack.package';
|
||||
|
||||
export async function compilePackage(isMinify: boolean) {
|
||||
return new Promise((resolve, reject) => {
|
||||
webpack(packageConfig(isMinify), (err, stats) => {
|
||||
if (err || stats.hasErrors()) {
|
||||
reject();
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user