- Clone the repo and run
yarn
- Run
yarn start
, you will see node inspect output like this:
Debugger listening on ws://127.0.0.1:9229/77d11bef-5731-4136-bf81-181e689ce2c8
For help, see: https://nodejs.org/en/docs/inspector
- Open Chrome and visit
chrome://inspect/#devices
- Click
inspect
link
- Click
Start
button in the Profiler tab
-
Then, wait about 30 seconds, when the Webpack finished building, click
Stop
button. -
Change the dropdown to
Heavy (Bottom Up)
if needed, and click theTotal Time
to sort the results.
Edit node_modules/postcss-preset-env/dist/index.js:L174
and change this function
function getUnsupportedBrowsersByFeature(feature) {
// ...
}
to this:
function _getUnsupportedBrowsersByFeature(feature) {
// ...
}
const getUnsupportedBrowsersByFeature = require("lodash/memoize")(
_getUnsupportedBrowsersByFeature
);
Make sure you installed
lodash
first.
The the Webpack build time will reduce to about 10 seconds.