ember-cli / ember-cli/loader.js

Avoid mutating module exports.

Open
#114 4 comments 3 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.