I am currently working with EmberJS version 2.4.2 and I have a specific requirement to handle custom configuration entries using an environment.js file.
var ENV = {
APP: {
myKey: "defaultValue"
}
};
While everything works perfectly in development mode, I encounter an issue after running 'ember build -prod' where the variable becomes inaccessible - showing as 'undefined' in production mode.
The way I am trying to access the key is as follows:
import ENV from '../config/environment';
(...)
ENV.APP.myKey
I would appreciate any insights on what might be causing this issue and how best to resolve it correctly.