I would like to set a requirejs configuration variable which would be available via module.config.
The optimizer does not seem to pass this through.
Is this possible, or should I handle this step via my build process.
2 Answers
A simple solution seems to be to be:
- Create a config file for each environment (eg.,
config,config-production) - When you want your config,
require('/path/to/config') - When you call r.js, just put in a paths argument (eg.,
r.js -o build.js paths.config=config-production) - You now have your production configuration settings