Skip to content

fix!: use compiler.options.mode to set the default value of failOnError#296

Merged
ricardogobbosouza merged 3 commits intomainfrom
fix-failOnError
Feb 27, 2026
Merged

fix!: use compiler.options.mode to set the default value of failOnError#296
ricardogobbosouza merged 3 commits intomainfrom
fix-failOnError

Conversation

@ricardogobbosouza
Copy link
Collaborator

When we are in a development environment, it is not usual for the compilation to fail with every lint error.

That's why changing the default value of failOnError based on WEBPACK_SERVE

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.98%. Comparing base (42de4fe) to head (e77ca2d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #296   +/-   ##
=======================================
  Coverage   98.98%   98.98%           
=======================================
  Files           7        7           
  Lines         296      297    +1     
  Branches       78       78           
=======================================
+ Hits          293      294    +1     
  Misses          3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
Copy link
Member

Let's make it more smarter, failOnError should be false for development, otherwise true, I think it is better change using process.env

@ricardogobbosouza
Copy link
Collaborator Author

Let's make it more smarter, failOnError should be false for development, otherwise true, I think it is better change using process.env

What do you think is better?
process.env.NODE_ENV or compiler.options.mode

failOnError: process.env.NODE_ENV !== "development",

or

failOnError: compiler.options.mode !== "development",

@alexander-akait
Copy link
Member

compiler.options.mode is better here

@ricardogobbosouza ricardogobbosouza changed the title fix!: make failOnError default depend on WEBPACK_SERVE fix!: use compiler.options.mode to set the default value of failOnError Feb 27, 2026
@ricardogobbosouza ricardogobbosouza merged commit def99b0 into main Feb 27, 2026
23 checks passed
@ricardogobbosouza ricardogobbosouza deleted the fix-failOnError branch February 27, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants