ember-cli / ember-cli/loader.js
Avoid mutating module exports.
- Dominant language
- JavaScript
- Stars
- 79
- Forks
- 69
- PR merge metrics
- No merged PRs in 30d
Description
We should stop mutating the modules exports.
This was needed while ember-cli was using `amdStrict` mode (since it did not use the `_interopRequireDefault` babel helper), and that is being unrolled in https://github.com/ember-cli/ember-cli/pull/6827.
Suggested migration path is:
* Change [makeDefaultExport](https://github.com/ember-cli/loader.js/blob/master/lib/loader/loader.js#L127) to use `Object.defineProperty(exports, 'default,...)` with a getter that issues a deprecation warning in debug builds (avoiding `Object.defineProperty` in prod builds).
* Remove deprecation and method after major version bump to loader.js@5.0.0.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.