Loader should work with getters

RESOLVED INVALID

Status

RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: jsantell, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Currently, getters on module exports are only called once and then baked:

`Object.defineProperties(exports, 'prop', { get: fn }`
`fn` is only called once and returns a value, and then always will return the initial value.
This was due to destructuring, and removing the property away from its parent object:
`let { prop } = require('./mod')`

This makes sense in terms of how getters work in ES5, but having getters on exports seems like something we should avoid for this reason.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.