When you do:
ember build --environment="production"
The environment
parameter is made available in config/environment.js
:
module.exports = function(environment) {
...
};
I also need to access the environment from within ember-cli-build.js
:
let STATIC_URL = "TODO"; // This depends on the deploy "environment" parameter
module.exports = function(defaults) {
let app = new EmberApp(defaults, {
fingerprint: {
enabled: true,
prepend: STATIC_URL,
},
});
return app.toTree();
};
How can I access the environment parameter from ember-cli-build.js
?
packages.json
). I have added the versions of ember-cli et al. The code location is already specified in the question, but I'll repeat. From the ember project top dir:config/environment.js
andember-cli-build.js
– Anabal