mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
fix(cli): build site failed
This commit is contained in:
@@ -12,7 +12,11 @@ const PLUGIN_NAME = 'VantCliSitePlugin';
|
||||
|
||||
export class VantCliSitePlugin {
|
||||
apply(compiler: Compiler) {
|
||||
compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, this.genSiteEntry);
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
compiler.hooks.beforeCompile.tapPromise(PLUGIN_NAME, this.genSiteEntry);
|
||||
} else {
|
||||
compiler.hooks.watchRun.tapPromise(PLUGIN_NAME, this.genSiteEntry);
|
||||
}
|
||||
}
|
||||
|
||||
genSiteEntry() {
|
||||
|
Reference in New Issue
Block a user