Skip to content

Commit c8c592a

Browse files
committed
fix: resolved a small bug
resolve #20
1 parent 20630f5 commit c8c592a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/webpackCompile.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ module.exports = async (ctx: any) => {
99
return;
1010
}
1111

12+
if (!ctx.opts.options || !ctx.opts.options.argv) {
13+
return;
14+
}
15+
1216
const argv = argvParse(ctx.opts.options.argv.join(' '));
1317
if (argv.livereload || argv.l) {
1418
return;

src/webpackServe.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ module.exports = async (ctx: any) => {
2121
return;
2222
}
2323

24+
if (!ctx.opts.options || !ctx.opts.options.argv) {
25+
return;
26+
}
27+
2428
const argv = argvParse(ctx.opts.options.argv.join(' '));
2529
if (!argv.livereload && !argv.l) {
2630
return;

0 commit comments

Comments
 (0)