Skip to content

Commit

Permalink
feat: use lodash-es for esm bundle (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored and jquense committed Jun 9, 2019
1 parent c3b7734 commit fb0fe5e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
"esm": {
"presets": [
["jason", { "modules": false }]
],
"plugins": [
["babel-plugin-transform-rename-import", {
replacements: [{ original: "lodash", replacement: "lodash-es" }]
}]
]
}
}
Expand Down
24 changes: 12 additions & 12 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"./dist/react-big-calendar.js": {
"bundled": 560715,
"minified": 171082,
"gzipped": 50325
"bundled": 554005,
"minified": 170219,
"gzipped": 50027
},
"./dist/react-big-calendar.min.js": {
"bundled": 496938,
"minified": 151688,
"gzipped": 45761
"bundled": 490228,
"minified": 150810,
"gzipped": 45487
},
"dist/react-big-calendar.esm.js": {
"bundled": 169709,
"minified": 81558,
"gzipped": 20076,
"bundled": 169733,
"minified": 81582,
"gzipped": 20080,
"treeshaked": {
"rollup": {
"code": 62946,
"import_statements": 1378
"code": 62970,
"import_statements": 1402
},
"webpack": {
"code": 66385
"code": 66409
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.22",
"babel-plugin-transform-rename-import": "^2.3.0",
"babel-preset-jason": "^6.0.1",
"bootstrap": "^3.3.5",
"component-metadata-loader": "^4.0.0",
Expand Down Expand Up @@ -126,6 +127,7 @@
"dom-helpers": "^3.4.0",
"invariant": "^2.2.4",
"lodash": "^4.17.11",
"lodash-es": "^4.17.11",
"memoize-one": "^4.0.3",
"prop-types": "^15.6.2",
"react-overlays": "^1.2.0",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2634,6 +2634,11 @@ babel-plugin-transform-remove-undefined@^0.5.0:
dependencies:
babel-helper-evaluate-path "^0.5.0"

babel-plugin-transform-rename-import@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-rename-import/-/babel-plugin-transform-rename-import-2.3.0.tgz#5d9d645f937b0ca5c26a24b2510a06277b6ffd9b"
integrity sha512-dPgJoT57XC0PqSnLgl2FwNvxFrWlspatX2dkk7yjKQj5HHGw071vAcOf+hqW8ClqcBDMvEbm6mevn5yHAD8mlQ==

babel-plugin-transform-simplify-comparison-operators@^6.9.4:
version "6.9.4"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9"
Expand Down

0 comments on commit fb0fe5e

Please sign in to comment.