Meteor + React + Antd - How to speed up build/rebuild time? (avoid less plugin delay)

允我心安 提交于 2019-12-13 07:49:13

问题


Uninstalling antd from my meteor project drops the build time by 38-40s on average. The profiler shows that plugin less needs >38s to deal with antd's huge less archive:

VELOCITY_DEBUG=1 VELOCITY_DEBUG_MIRROR=1 METEOR_PROFILE=1 meteor | grep less
...
| other plugin less.......................................38,766 ms (2)
...

this number drops to <1s (572ms) when i uninstall antd:

| other plugin less..........................................572 ms (2)

>30s is simply too long to wait for the app to refresh during development.

Does anyone know a strategy to avoid this delay?


回答1:


Looks like the upcoming meteor update fixes this.

I updated to the recent beta:

meteor update --release 1.7.1-beta.10

restarted meteor with the profiler:

VELOCITY_DEBUG=1 VELOCITY_DEBUG_MIRROR=1 METEOR_PROFILE=1 meteor --inspect | grep 'less\|Total'

and now the less plugin is taking way less than 1 second on file save
and total rebuild time is back within reason:

|    │     │  ├─ plugin less                                       45 ms (2)
| (#5) Total: 4,270 ms (Rebuild App)


来源:https://stackoverflow.com/questions/51096715/meteor-react-antd-how-to-speed-up-build-rebuild-time-avoid-less-plugin-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!