Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Avoid mutating module exports.

Open
#114 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start in lib/loader/loader.js at makeDefaultExport and review the linked ember-cli migration context. Trace how module exports are currently mutated in debug and production builds, then verify that the compatibility behavior and deprecation path match the issue's loader.js@5.0.0 plan.

Written by the indexing model from the issue text.

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 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.
Dominant language
JavaScript
Stars
79
Forks
69
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ember-cli/loader.js

All issues in ember-cli/loader.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.