We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a062acd commit fb76dbfCopy full SHA for fb76dbf
dev/src/gulp/gulp_webpack.ts
@@ -7,7 +7,12 @@ import * as cp from 'child_process';
7
import * as path from 'path';
8
import * as process from 'process';
9
10
-export function gulp_webpack(mode: string): cp.ChildProcess {
+export function gulp_webpack(mode: 'development' | 'production'): cp.ChildProcess {
11
+
12
+ if (mode !== 'development' && mode !== 'production') {
13
+ throw new Error('Invalid mode. Must be either "development" or "production"');
14
+ }
15
16
const env: {
17
[key: string]: string | undefined;
18
} = process.env;
0 commit comments