-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
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
Dev server stops completely when postcss-loader throws error #4514
Comments
Oh, sounds like a regression in postcss, I don't know why they move on getter throwing errors... |
Shortly - when we try to get /cc @ai |
@s-shev Please update https://github.com/webpack-contrib/postcss-loader/ to |
@alexander-akait Can confirm that with postcss-loader |
@alexander-akait PostCSS has a lazy processing for 2 cases:
We use it to avoid spending unnecessary resources. |
@ai yeah, I undestand this, just intresting why it is on the getter... Usually I don't expect to get errors on getter... |
@alexander-akait for the case when you called PostCSS without plugins and then request only |
@ai I undestans this too, but before this feature we don't have an error on the getter, now we have, that is why we have this problem, sounds like a breaking change, but we already solve it, so it doesn't make sense to fix it, anyway getting errors using a method was better solution here (+ document it) |
Bug report
webpack-dev-server
stops completely when during rebuildpostcss-loader
throws an error.Actual Behavior
I start dev server via
npx webpack-dev-server
and when I start typing new rule in.css
webpack tries to rebuild my app but since I haven't finished typing, file contains incorrect css rule. So build fails due topostcss-loader
throwing errorCssSyntaxError
. However that makeswebpack-dev-server
stop completely.This started happening after I updated to webpack 5. Previously
webpack-dev-server
simply ignored failed builds and waited till webpack manages to successfully build my app.Expected Behavior
Dev server shouldn't completely stop on error from loader but wait till webpack manage to successfully build the app
How Do We Reproduce?
I prepared repository where you can reproduce it https://github.com/s-shev/webpack-dev-server-stops. Clone it, install packages, run
npm start
ornpx webpack-dev-server
, open./src/styles.module.css
and start typing new rule: you'll see in terminal thatpostcss-loader
throws exception and server stops.Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: