Replies: 11 comments
-
Hmm but what if only some part was unsuccessful but the output still contains valid bundles? Is there a hybrid scenario possible where only some part of the webpack build failed but |
Beta Was this translation helpful? Give feedback.
-
At least in my case, when my build fails no files are generated at all. And since I clear my dist folder before each build, I get those messages I mentioned:
And at the end:
Maybe we have another problem, I mean why is this plugin trying to analyze those non existing files in the first place? |
Beta Was this translation helpful? Give feedback.
-
It is because the webpack stats object generated by webpack lists the bundles that would be output and webpack-bundle-analyzer/src/BundleAnalyzerPlugin.js Lines 33 to 38 in 34b6223 webpack-bundle-analyzer/src/BundleAnalyzerPlugin.js Lines 119 to 120 in 34b6223 webpack-bundle-analyzer/src/viewer.js Line 117 in 34b6223 webpack-bundle-analyzer/src/viewer.js Line 127 in 34b6223 webpack-bundle-analyzer/src/viewer.js Lines 189 to 199 in 34b6223 webpack-bundle-analyzer/src/analyzer.js Line 20 in 34b6223 webpack-bundle-analyzer/src/analyzer.js Lines 50 to 60 in 34b6223 webpack-bundle-analyzer/src/parseUtils.js Lines 10 to 11 in 34b6223 |
Beta Was this translation helpful? Give feedback.
-
We can probably do nothing if there are compilation errors? @valscion what do you think? |
Beta Was this translation helpful? Give feedback.
-
Yeah, that might make sense. It's likely that we won't be able to do much with the resulting bundles (if there are any) after compilation errors anyway. |
Beta Was this translation helpful? Give feedback.
-
Yeah, doing nothing after any errors (including errors resulting from multiconfigs) would be nice. Of course this also could be a configuration setting, so if users want to have a report even after having errors, they still can do that. But I think in most cases, it makes no sense to generate a report when the build fails anyways. |
Beta Was this translation helpful? Give feedback.
-
Nah, I'd prefer not adding new configuration options for this |
Beta Was this translation helpful? Give feedback.
-
OK, I also would be fine with no additional options |
Beta Was this translation helpful? Give feedback.
-
This still appears to be an issue. |
Beta Was this translation helpful? Give feedback.
-
Same here, it's incredibly annoying to see By default it should just detect the failure and output just "Webpack failed, no soup for you!", especially when it cannot find the assets at all and it shows:
|
Beta Was this translation helpful? Give feedback.
-
PR welcome :) |
Beta Was this translation helpful? Give feedback.
-
Right now, when my build fails the bundle analyzer runs nonetheless, spitting out hundreds of lines like "Error parsing bundle asset ..."
It would be much nicer if I could configure this plugin to run only after a successful build
Beta Was this translation helpful? Give feedback.
All reactions