Skip to content

Commit

Permalink
Creating more accurate size estimates
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed May 12, 2021
1 parent 525ecfe commit c2edde9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@
},
{
"path": "./dist/size-rollup-dom-animation.js",
"maxSize": "20 kB"
"maxSize": "16.9 kB"
},
{
"path": "./dist/size-rollup-dom-max.js",
"maxSize": "26 kB"
"maxSize": "22.3 kB"
},
{
"path": "./dist/size-webpack-m.js",
Expand Down
30 changes: 19 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,23 +84,31 @@ const m = Object.assign({}, es, {
})

const domAnimation = Object.assign({}, es, {
input: "lib/render/dom/features-animation.js",
output: Object.assign({}, es.output, {
file: `dist/size-rollup-dom-animation.js`,
input: {
"size-rollup-dom-animation-m": "lib/render/dom/motion-minimal.js",
"size-rollup-dom-animation": "lib/render/dom/features-animation.js",
},
output: {
format: "es",
exports: "named",
preserveModules: false,
dir: undefined,
}),
entryFileNames: "[name].js",
chunkFileNames: "size-rollup-dom-animation-assets.js",
dir: `dist`,
},
plugins: [resolve(), terser({ output: { comments: false } })],
external: ["react", "react-dom"],
})

const domMax = Object.assign({}, es, {
input: "lib/render/dom/features-max.js",
output: Object.assign({}, es.output, {
file: `dist/size-rollup-dom-max.js`,
preserveModules: false,
dir: undefined,
}),
input: {
"size-rollup-dom-max-m": "lib/render/dom/motion-minimal.js",
"size-rollup-dom-max": "lib/render/dom/features-max.js",
},
output: {
...domAnimation.output,
chunkFileNames: "size-rollup-dom-max-assets.js",
},
plugins: [resolve(), terser({ output: { comments: false } })],
external: ["react", "react-dom"],
})
Expand Down

0 comments on commit c2edde9

Please sign in to comment.