javascript - Integrate requirejs text plugin into requirejs core -
I'm using the requiredjs with different libraries such as backbone and jquery in my files to use suffocation in my plan To load all my lips together and to load it once in my index.html file, because all the lbs are required anyway, I want to save some code. Therefore, instead of loading jquery and spinal cord every time instead of viewing a new backbone or coded model, simply use backbone and jquery because it loads in the global scope. The only stuff I'm loading is my thoughts, models and collections.
But the text plugin gives me some headache. It needs to be separated from my concatenated lib files since all the time I load an HTML file with "text! Blabla.html", so it first tries to load the plugin text before loading the HTML file . So I can stop the text plugin with requirejs without any other libs, which preloaded on page load.
Is there any possibility of uniting readers in needjs, so it is "known" in the core of the defaults. Otherwise I have a library file in all libraries and text.js, because requirejs wants to load asynchronous on demand and it has not been loaded with the need of itself.
Can someone help solve this? Actually, it is not really optimized, because now I have been forced to make 2 GET requests so that my libraries load instead of one.
Nicos is right in your comment that you have r.js
In projects where you want to use all the files text!
, you can insert files filled with r.js
text
! Change code> custom bundle (s), and text!
Plug in a self with a stub.
Comments
Post a Comment