Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up build times for webpack (phoenixframework#3899)
On an unmodified default generated project (with --live) using the Phoenix 1.5.3 installer, the build time is: $ webpack --mode development Version: webpack 4.41.5 Time: 1681ms Changing the source-map mode to `eval-cheap-module-source-map` changes this time slightly: Time: 1397ms The `hard-source-webpack-plugin` caches intermediate build steps, which produces significantly faster rebuilds: Time: 474ms Combining these two results in: Time: 193ms This improvement seems to scale well too. On a project including tailwind, the build time by default is close to 6 seconds, but with the above config, 212ms. `eval-cheap-module-source-map` preserves line numbers in the source maps, but not column information. This seems like a resonable trade off vs `eval-module-source-map` which is a bit slower. Time: 491ms
- Loading branch information