We noticed when the webpack build fails or the typescript declaration emitting step fails, the cli process does not exit with a non-zero code. This is problematic in a CI context as the CI pipeline will continue running the next steps in the job/next job as it doesn't detect the failure.
The following updates should probably be made:
- Catch errors thrown by
buildDeclaration
- If an error is caught by
buildDeclaration or the errors variable has a truthy value, add code to call process.exit with a non-zero code.