adopted-ember-addons / ember-moment

MIT License
399 stars 122 forks source link

Environment configuration does not work as documented #375

Closed mayatron closed 3 months ago

mayatron commented 2 years ago

The README.md shows the following example configuration for the allowEmpty option:

// config/environment.js
module.exports = function() {
  return {
    moment: {
      allowEmpty: true // default: false
    }
  }
};

However, this does not seem to work for me, unless I change the key from moment to 'ember-moment' like this:

// config/environment.js
module.exports = function() {
  return {
    'ember-moment': {
      allowEmpty: true // default: false
    }
  }
};

Additionally, the application config appears to point to ember-moment as the expected key in multiple places:

Am I missing something? Or should we update the README from moment to 'ember-moment'?

MikiDi commented 2 years ago

I'm experiencing this as well (ember-moment v10.0.0). Config in config/environment.js is not picked up by key moment, but ember-moment. May I suggest broadening the title of this issue @mayatron ?

mayatron commented 2 years ago

I'm experiencing this as well (ember-moment v10.0.0). Config in config/environment.js is not picked up by key moment, but ember-moment. May I suggest broadening the title of this issue @mayatron ?

Done!

NullVoxPopuli commented 3 months ago

docs updated, thanks!