We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74ce177 commit ba1ee87Copy full SHA for ba1ee87
lib/preprocessor-configuration.ts
@@ -188,19 +188,7 @@ function validateEnvironmentOverrides(
188
if (hasOwnProperty(environment, "jsonArgs")) {
189
let { jsonArgs } = environment;
190
if (isString(jsonArgs)) {
191
- try {
192
- jsonArgs = JSON.parse(jsonArgs);
193
- } catch (err) {
194
- let parseErrorMessage = "";
195
- if (err instanceof Error) {
196
- parseErrorMessage = `JSON.parse(jsonArgs) failed with message:\n${err.message}`;
197
- }
198
- throw new Error(
199
- `Expected valid JSON (jsonArgs), but got ${util.inspect(
200
- jsonArgs
201
- )}\n${parseErrorMessage}`
202
- );
203
+ overrides.jsonArgs = [jsonArgs];
204
}
205
if (Array.isArray(jsonArgs) && jsonArgs.every(isString)) {
206
overrides.jsonArgs = jsonArgs;
0 commit comments