Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit Module Broken in Production Mode #14

Closed
aruberto opened this issue Feb 4, 2016 · 4 comments
Closed

Unit Module Broken in Production Mode #14

aruberto opened this issue Feb 4, 2016 · 4 comments

Comments

@aruberto
Copy link
Contributor

aruberto commented Feb 4, 2016

Wrote a simple app to test this webpack plugin - https://github.com/aruberto/globalize-webpack-test

However I'm running into problem with unit formatter. The page with my unit formatter examples (click here http://aruberto.github.io/globalize-webpack-test/#/unit) throws the following error:

image

The secondFormatter reffered to in error is from following line of source code in https://github.com/aruberto/globalize-webpack-test/blob/master/src/components/unit/index.js:

const secondFormatter = Globalize.unitFormatter('second');

When run in DEV mode, the unit module works correctly and the page loads fine.

Also all the other formatters work correctly in PROD mode (example http://aruberto.github.io/globalize-webpack-test/#/number)

rxaviers added a commit to globalizejs/globalize that referenced this issue Feb 4, 2016
@rxaviers
Copy link
Owner

rxaviers commented Feb 4, 2016

Crap, it was a bug in the Globalize unit runtime module: globalizejs/globalize@1d2f977 (I'm considering a 1.1.1 patch release providing this fix).

Globalize examples need improvement and your help would be very much appreciated. 👊

By the way, react-globalize could be handy for you: usage example. It's worthy to note FormatUnit (the component for unit formatting) isn't implemented yet, would you be interested in implementing it?

@rxaviers
Copy link
Owner

rxaviers commented Feb 4, 2016

Globalize 1.1.1 released with such fix. Please could you retry using the newer version? Thx

@aruberto
Copy link
Contributor Author

aruberto commented Feb 4, 2016

http://aruberto.github.io/globalize-webpack-test/#/unit

It seems to be working now, thx!

I might be able to update docs in coming weeks, just building this demo example cause trying to proof of concept i18n options for an app at work. I also plan on trying react-globalize + react-globalize-webpack-compiler next.

@rxaviers
Copy link
Owner

rxaviers commented Feb 4, 2016

Excellent, looking forward to it. If you find any problems just let me know.

@rxaviers rxaviers closed this as completed Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants