javascript - RequireJS Optimizer - One JS File vs. Whole Project -


i have requirejs project several webpages. each webpage there's main/require-configuration js file loaded. structure this:

something this:

- p1.html - p2.html - /scripts     - main1.js     - main2.js     - /controllers         -...     - /views         -... - /css - /images 

i have r.js build profile file each "flow" (build-flow1.js, build-flow2.js). i'm using requirejs optimizer (running r.js) optimize single js each flow.

i'm reconsidering build configuration since couldn't explain myself earn, @ runtime, using requirejs if build single, concatenated js file. understand having code modularized requirejs enables r.js compilation, requirejs first , foremost loader framework, seems i'm earning these capabilities... or didn't right?

there's documentation building whole project. looks result in other method (single js files), copies side folder , there. what's difference?

sounds questioning benefit of bothering requirejs/amd when gets built 1 file regardless?

someone asked similar question , great answers appeared in gist.

on top of there 'why web modules?' page on requirejs site.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -