-
-
Notifications
You must be signed in to change notification settings - Fork 70
Description
- webpack Version: 4.39.2
- stylelint-webpack-plugin Version: 0.10.5
This issue is for a:
- bug
- feature request
- modification request
Expected Behavior
the plugin does not have a large impact on webpack watch recompile time, especially if styles were not changed since the last build.
Actual Behavior
In our reasonably large project with many css/scss modules, there is about a 6s delay between when a webpack watch rebuild is triggered, and when the module building phase begins. This is caused by the watchRun hook used by this plugin, which blocks the rest of the compilation and takes a long time.
How Do We Reproduce?
Set up a large enough project that runner takes significant time. Change any module to trigger a webpack recompile. observe that with this plugin enabled, it takes much longer.
Using the lintDirtyModulesOnly option avoids this issue, but looking at the code there seems to be a race condition where if the linting process does not complete by the time the compiler emit phase is reached, the errors will never be reported. It is also not clear why it is not enabled by default - is there any other problem with it? (It seems like a no brainer to not re lint files that have not changed since last time).