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

Tripple webpack injection #45

Closed
klimashkin opened this issue Dec 11, 2014 · 1 comment
Closed

Tripple webpack injection #45

klimashkin opened this issue Dec 11, 2014 · 1 comment
Labels

Comments

@klimashkin
Copy link

Hello!
For now I see that in result webpack bundle I have 3 repetitive modules react-intl/lib/main.js
Moreover, each of it requires their own react-intl/lib/en.js

/* 475 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    exports["default"] = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}}}};

    //# sourceMappingURL=en.js.map

/***/ },
/* 476 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    var src$mixin$$ = __webpack_require__(477), src$en$$ = __webpack_require__(475);

    src$mixin$$.default.__addLocaleData(src$en$$.default);

    exports["default"] = src$mixin$$.default;

    //# sourceMappingURL=main.js.map

/***/ },

/* 483 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    exports["default"] = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";}};

    //# sourceMappingURL=en.js.map

/***/ },
/* 485 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    var src$core$$ = __webpack_require__(482), src$en$$ = __webpack_require__(483);

    src$core$$.default.__addLocaleData(src$en$$.default);
    src$core$$.default.defaultLocale = 'en';

    exports["default"] = src$core$$.default;

    //# sourceMappingURL=main.js.map

/***/ }

/* 491 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    exports["default"] = {"locale":"en","pluralRuleFunction":function (n) {var i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;n=Math.floor(n);if(i===1&&v===0)return"one";return"other";},"fields":{"second":{"displayName":"Second","relative":{"0":"now"},"relativeTime":{"future":{"one":"in {0} second","other":"in {0} seconds"},"past":{"one":"{0} second ago","other":"{0} seconds ago"}}},"minute":{"displayName":"Minute","relativeTime":{"future":{"one":"in {0} minute","other":"in {0} minutes"},"past":{"one":"{0} minute ago","other":"{0} minutes ago"}}},"hour":{"displayName":"Hour","relativeTime":{"future":{"one":"in {0} hour","other":"in {0} hours"},"past":{"one":"{0} hour ago","other":"{0} hours ago"}}},"day":{"displayName":"Day","relative":{"0":"today","1":"tomorrow","-1":"yesterday"},"relativeTime":{"future":{"one":"in {0} day","other":"in {0} days"},"past":{"one":"{0} day ago","other":"{0} days ago"}}},"month":{"displayName":"Month","relative":{"0":"this month","1":"next month","-1":"last month"},"relativeTime":{"future":{"one":"in {0} month","other":"in {0} months"},"past":{"one":"{0} month ago","other":"{0} months ago"}}},"year":{"displayName":"Year","relative":{"0":"this year","1":"next year","-1":"last year"},"relativeTime":{"future":{"one":"in {0} year","other":"in {0} years"},"past":{"one":"{0} year ago","other":"{0} years ago"}}}}};

    //# sourceMappingURL=en.js.map

/***/ },
/* 493 */
/***/ function(module, exports, __webpack_require__) {
    "use strict";
    var src$core$$ = __webpack_require__(489), src$en$$ = __webpack_require__(491);

    src$core$$.default.__addLocaleData(src$en$$.default);
    src$core$$.default.defaultLocale = 'en';

    exports["default"] = src$core$$.default;

    //# sourceMappingURL=main.js.map

/***/ }

@ericf
Copy link
Collaborator

ericf commented Dec 11, 2014

These are the internal libraries that make up react-intl, you're seeing the compiled output of:

We authored these libraries the same which is why they look the same. These are not duplicates. The locale data for both intl-messageformat and intl-relativeformat both contain the pluralization function, this is very very minor and gzip will handle the duplication.

@ericf ericf closed this as completed Dec 11, 2014
@ericf ericf added the invalid label Dec 11, 2014
longlho pushed a commit that referenced this issue Apr 27, 2020
longlho pushed a commit that referenced this issue Apr 27, 2020
* feat(relativeformat): improved day-diffing logic

* feat(relativeformat): re-generated dist files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants