Closed Chevelleboyer closed 1 year ago
I can't help you with how little information you've provided.
Can you provide a minimal reproduction so I can debug?
You mean n/a
wasn't enough? š
While trying to reproduce with a trivial project, I found that we actually had a patch for esbuild-loader 2.20.0
Our patch was disabling the calls to asset.source.map()
and asset.source.sourceAndMap()
unless it was a sourcemap build. (We generate sourcemaps in a separate build)
Removing our patch makes v2.20.0
and v2.21.0
perform the same š
Closing this now, sorry for any troubles!!
Are you saying disabling those calls makes large performance improvements even with devtools: false
in the Webpack config?
If so, I'm very open to bringing those changes into the project. Would you be willing to open a PR?
Yes that's correct, even with devtools: false
it seems like asset.source.sourceAndMap()
is still being called. Our patch just calls asset.source.source()
instead of asset.source.sourceAndMap()
if sourcemaps aren't enabled.
And yes I'm happy to open a PR!š
Bug description
A few weeks ago a colleague of mine opened issue #298 regarding the explicit dependency on
webpack-sources@1.4.3
for Webpack v4. It was resolved inesbuild-loader
v2.21.0, thank you so much!After upgrading to
esbuild-loader
v2.21.0, however, we noticed a significant slow down in Webpack build times. Our build times have almost doubled :( When downgrading to version 2.20.0 we see the build times improve again.Do the fixes in v2.21.0 necessitate this performance regression when using Webpack v4, or is there a way to fix this?
Reproduction
n/a
Node.js package manager
npm
Environment
Can you contribute a fix?