Open Toub opened 8 years ago
invalid-code();
? Why ?
invalid-code(); ? Why ?
It is just an example of code that breaks the build.
If the build is broken, gulp should return a non-zero error code, else automated tools such as jenkins or ansible won't know about the error and will continue the deployment, resulting to deploy a broken application.
I have the same issue with generator 0.7.1 and typescript with webpack
This issue is documented in typescript-loader : https://github.com/TypeStrong/ts-loader#failing-the-build-on-typescript-compilation-error
To solve this, we just need to add the fail-plugin to webpack : https://www.npmjs.com/package/webpack-fail-plugin
Description
If gulp build fails, the process should return a non-zero code to stop the build/deployment process.
With a fresh generated app with generator-fountain-webapp@0.6.0, just add the following line to index.js:
The process fails:
But it returns a 0 (SUCCESS) error code:
A non-zero error is expected in case of failure.
Config
Environment
Reproduced in 2 environments: