Open cristinecula opened 5 years ago
this is undefined when imported as es6 module.
this
Include detection from umd: https://github.com/umdjs/umd/blob/master/templates/amdWeb.js
This makes importing as es6 module work:
import 'money'; window.fx.convert(...)
Ideally the module should be rewritten to export fx directly, instead of registering to window, but this gets the job done.
import { fx } from 'money' fx.convert(...)
this
is undefined when imported as es6 module.Include detection from umd: https://github.com/umdjs/umd/blob/master/templates/amdWeb.js
This makes importing as es6 module work:
Ideally the module should be rewritten to export fx directly, instead of registering to window, but this gets the job done.