formatjs / formatjs-old

The monorepo home to all of the FormatJS related libraries.
https://formatjs.io/
156 stars 53 forks source link

intl-displaynames locale data not minified under dist folder #539

Closed roderickhsiao closed 4 years ago

roderickhsiao commented 4 years ago

Which package? @formatjs/intl-displaynames

Describe the bug The dist file doesn't seem to be minified https://unpkg.com/@formatjs/intl-displaynames@1.2.0/dist/locale-data/en.js

where other package locale data does minified. https://unpkg.com/browse/@formatjs/intl-relativetimeformat@4.5.9/dist/locale-data/en.js

Expected behavior Same behavior across different formatjs packages

Screen Shot 2020-02-27 at 7 05 49 PM
roderickhsiao commented 4 years ago

Seems like its expected but just the template https://github.com/formatjs/formatjs/blob/master/packages/intl-displaynames/scripts/cldr.ts#L45 is stringify with space and the template format with line break https://github.com/formatjs/formatjs/blob/master/packages/intl-displaynames/scripts/cldr.ts#L66

I'll close this and doing uglify in our app

longlho commented 4 years ago

Hmm we should minify this.

On Thu, Feb 27, 2020 at 7:12 PM Roderick Hsiao notifications@github.com wrote:

Closed #539 https://github.com/formatjs/formatjs/issues/539.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/formatjs/formatjs/issues/539?email_source=notifications&email_token=AABQM3Z5M6FC5R3MSKX6GC3RFB6IZA5CNFSM4K5HZCSKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOW6MXNKY#event-3080287915, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABQM3ZZEHZKCSFWTL66FN3RFB6IZANCNFSM4K5HZCSA .

roderickhsiao commented 4 years ago

I think umd file did have .min file running through uglily js, /dist file mostly just directly written from template string.

Could be either way, let client to minify or we did it at publish.

I'll reopen and let you guys decide :)

pyrocat101 commented 4 years ago

Fixed with 1.2.1 release.

roderickhsiao commented 4 years ago

awesome thanks