When is RequireJS' require call asynchronous? When is it synchronous?

前端 未结 3 1383
北恋
北恋 2021-01-02 18:21

I use RequireJS to load my modules in one of my projects. I see around the web different ways to require modules using the require call (and not define

3条回答
  •  旧巷少年郎
    2021-01-02 19:11

    According to require.js docs it is a wrapper. So it is rebuilding code to work asynchronously. It is called CommonJs wrapper. You can find more info about it here

提交回复
热议问题