Skip to content

Commit

Permalink
more specific errors for js api options
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Dec 6, 2020
1 parent c1d9d1a commit 2001dff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ function flagsForBuildOptions(options: types.BuildOptions, isTTY: boolean, logLe
if (inject) for (let path of inject) flags.push(`--inject:${path}`);
if (loader) {
for (let ext in loader) {
if (ext.indexOf('=') >= 0) throw new Error(`Invalid extension: ${ext}`);
if (ext.indexOf('=') >= 0) throw new Error(`Invalid loader extension: ${ext}`);
flags.push(`--loader:${ext}=${loader[ext]}`);
}
}
if (outExtension) {
for (let ext in outExtension) {
if (ext.indexOf('=') >= 0) throw new Error(`Invalid extension: ${ext}`);
if (ext.indexOf('=') >= 0) throw new Error(`Invalid out extension: ${ext}`);
flags.push(`--out-extension:${ext}=${outExtension[ext]}`);
}
}
Expand Down

0 comments on commit 2001dff

Please sign in to comment.