Closed makepanic closed 3 years ago
Hi,
when using ember-cli-flash in a project that enables includeExternalHelpers in its ember-cli-babel settings, the transpiled code will throw.
includeExternalHelpers
ember-cli-babel
This happens because the addon/flash/object defines a Object class. During the transpilation babel adds the esModule marker:
addon/flash/object
Object
Object.defineProperty(_exports, "__esModule", { value: true }); // ... var Object = (_dec = (0, _computed.guidFor)('message').readOnly(), (_class = (_temp = /*#__PURE__*/function (_Ember$Object$extend) {
Due to variable hoisting, it'll try to call defineProperty on the class that ember-cli-flash defined.
defineProperty
If it's ok, I'll open a PR to rename that class name to something like FlashObject which prevents this from happening.
FlashObject
Hi,
when using ember-cli-flash in a project that enables
includeExternalHelpers
in itsember-cli-babel
settings, the transpiled code will throw.This happens because the
addon/flash/object
defines aObject
class. During the transpilation babel adds the esModule marker:Due to variable hoisting, it'll try to call
defineProperty
on the class that ember-cli-flash defined.If it's ok, I'll open a PR to rename that class name to something like
FlashObject
which prevents this from happening.