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.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wish @nativescript/webpack would not discard errors from the configuration stage and instead halt the NativeScript build process.
I recently wrote a Webpack plugin to validate some env-vars that are required at runtime.
My attempts to raise an exception are visualised in the CLI however NativeScript proceeds with the build regardless.
It would be nice if NativeScript could propagate the raised exception for a better control flow when handling errors.
Instead I find myself considering this hacky workaround. The try/catch block is for illustrative purposes only.
try { doSomethingThatMayThrow() } catch (e) { process.exitCode = 1 // this feels wrong throw e // pointless anyway }
I believe this is the offending code.
NativeScript/packages/webpack5/src/bin/index.ts
Lines 78 to 87 in 6f87dbc
The text was updated successfully, but these errors were encountered:
Thanks for tracking this @insytes long time desire here; we’ll tackle this one likely for 9.0 but possibly sooner.
Sorry, something went wrong.
fix(webpack): set exitCode if the configuration failed
f20c835
fixes #10314
fix(webpack): set exitCode if the configuration failed (#10327)
adb4e9d
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
I wish @nativescript/webpack would not discard errors from the configuration stage and instead halt the NativeScript build process.
I recently wrote a Webpack plugin to validate some env-vars that are required at runtime.
My attempts to raise an exception are visualised in the CLI however NativeScript proceeds with the build regardless.
Describe the solution you'd like
It would be nice if NativeScript could propagate the raised exception for a better control flow when handling errors.
Describe alternatives you've considered
Instead I find myself considering this hacky workaround. The try/catch block is for illustrative purposes only.
Anything else?
I believe this is the offending code.
NativeScript/packages/webpack5/src/bin/index.ts
Lines 78 to 87 in 6f87dbc
Please accept these terms
The text was updated successfully, but these errors were encountered: