Closed notwaldorf closed 6 years ago
@notwaldorf Have you tried importing directly from intl-messageformat/src/main.js
? They seem to be subtly suggesting that's a way to import via ES6 module in their package.json. Couldn't find any mention of it in their documentation though.
Something like:
import IntlMessageFormat from 'intl-messageformat/src/main.js';
I was able to get this ^ to work in a behaviour we have that extends app-localize-behavior
, but I had to further set window.IntlMessageFormat = IntlMessageFormat
since you're expecting a global variable.
@dlockhart i hadn't, will try!
@bicknellr changes done; also did the @dlockhart fix which worked great.
This was a bit of a gnarly port. Biggest change is that we can't load the
IntlMessageFormat
library inside the behaviour anymore since it's pre-modules and it doesn't play nicely inside a module.