Answer the question
In order to leave comments, you need to log in
RequireJS: How to compile to one file so that there is no define?
In order not to connect the library in production?
And during development, everything was dynamically loaded.
//start
console.log("Code util.js");
define('main',["util"], function() {
console.log("Code main.js");
});//end
Answer the question
In order to leave comments, you need to log in
1. You will not achieve dynamic loading with require.js.
2. Everything is glued into one file using r.js
3. In order not to load the entire require.js, you need the so-called. AMD-shim, for example - almond
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question