javascript - How can I tell Require.js to use the same paths and shims for multiple mains? -


we have suite of similar apps, being built same codebase. there 5 different main.js files, , repeat same

requirejs.config({   paths: { foo foo foo },   shim: { bar bar bar } }); 

in each main. ideally, keep dry defining these values once. possible define them somewhere external main.js file?

thanks in advance!

i've created own personal distribution of require.js purpose.

it original require.js code configuration (paths , shims) concatenated bottom. means projects never have declare find jquery, etc. pretty handy.

note: individual projects may still call require.config in order set project-specific locations, etc. technically calling second time (as first time called when loading require.js) works fine according tests.


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -