javascript - Eliminating need for require js from optimized app -


i've built app using require.js in order keep modular. having finished turns out require.js bigger optimised app code. there way can r.js optimise in such way don't need include require.js in final page (e.g. replacing define calls direct definition of properties on namespace object, whole thing wrapped in closure).

i'm using define() - never require(), if makes difference..?

you still need amd loader can switch lighter one, such almond. almond around 1 kilobyte when minified , gzipped.

from faq:

almond amd api shim small, can used in place of require.js when of modules built 1 file using requirejs optimizer.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -