search

Home  >  Q&A  >  body text

javascript - Does webpack require have any global hook functions or callback functions before and after asynchronous loading?

I want to add a loading to the web page before the require asynchronous request component, and close the loading after the request is completed. Does webpack require have such a global hook function?

高洛峰高洛峰2748 days ago450

reply all(1)I'll reply

  • 怪我咯

    怪我咯2017-05-16 13:40:55

    Just encapsulate one yourself and repackage require.ensure

    reply
    0
  • Cancelreply