Skip to content

Instantly share code, notes, and snippets.

@dbashford
Created September 9, 2014 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbashford/579dd863709c3d9b8fa3 to your computer and use it in GitHub Desktop.
Save dbashford/579dd863709c3d9b8fa3 to your computer and use it in GitHub Desktop.
Managing switching between prod/dev versions of Ember
require: {
optimize: {
overrides: function( runConfig ) {
if ( !runConfig.paths ) {
runConfig.paths = {};
}
// prod version of ember for optimized builds
runConfig.paths.ember = 'vendor/ember/ember.prod';
}
}
}
@dbashford
Copy link
Author

We have an ember alias in the app that we use all over the place. When running non-optimized builds, we use the dev version of ember, kept at vendor/ember/ember.js, so the alias is for vendor/ember/ember. When running with the --optimize flag ticked, then we override that path with vendor/ember/ember.prod which points to ember.prod.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment