Why do concatenated RequireJS AMD modules need a loader?

前端 未结 5 1431
后悔当初
后悔当初 2021-01-30 17:05

We love RequireJS and AMD during development, where we can edit a module, hit reload in our browser, and immediately see the result. But when it comes time to concatenate our mo

5条回答
  •  天涯浪人
    2021-01-30 17:48

    In case you compile you code with require.js into a single large file for production, you can use almond.js to completely replace require.

    Almond only handles the module references management not the loading itself which is no longer needed.

    Be careful of the restrictions almond imposes in order to work

提交回复
热议问题