Closed daix6 closed 3 years ago
Please update to webpack v5, we improve speed and reduce memory usage very well
Okay......
I have tried building with webpack 5 and it does be faster. But for some reason, I have to use webpack 4 for my project :sweat:
It seems like that I can't fix old version's problem with pull request. So let it be for now...
old versions of webpack-sources
accept only security fixed, there are outdated, so there is only one solution - update to webpack v5, also in the latest version we very improve speed and memory usage, so please strongly consider migration, sorry, anyway feel free to feedback
https://github.com/webpack/webpack-sources/blob/d9117497dfbac940c02aa97a6fe48af633154edc/lib/applySourceMap.js#L70-L74
Webpack 4 is still using the 1.4.1 version of webpack-sources, in which version these lines are super slow, especially for those files whose lines are very long.
I came across this problem when my webpack 4 trying to load exceljs (which actually loads exceljs.min.js, an already minified file that has very long lines) and generate a sourcemap with columns.
Maybe excluding dependencies like these files is the best practice, but I assume that this should be optimized.