-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Babel7 #590
Babel7 #590
Changes from 5 commits
b141add
396063e
e1233a9
73e10ca
f274892
66f46b7
3561f1d
8b978c2
8024eab
968f875
71d6146
6a308e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
presets: [ | ||
'@babel/react', | ||
'@babel/flow', | ||
['@babel/env', { modules: false, loose: true }], | ||
], | ||
plugins: [ | ||
['@babel/proposal-class-properties', { loose: true }], | ||
['@babel/proposal-object-rest-spread', { loose: true }], | ||
], | ||
comments: false, | ||
}; | ||
|
||
if (process.env.NODE_ENV === 'test') { | ||
module.exports.plugins.push('@babel/transform-modules-commonjs'); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
{ | ||
"dist/react-beautiful-dnd.js": { | ||
"bundled": 391074, | ||
"minified": 148259, | ||
"gzipped": 42162 | ||
"bundled": 356054, | ||
"minified": 134070, | ||
"gzipped": 37695 | ||
}, | ||
"dist/react-beautiful-dnd.min.js": { | ||
"bundled": 353559, | ||
"minified": 135149, | ||
"gzipped": 37985 | ||
"bundled": 320016, | ||
"minified": 121108, | ||
"gzipped": 33429 | ||
}, | ||
"dist/react-beautiful-dnd.esm.js": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please explain the numbers in this section a little bit more? I am a bit confused There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. treeshaked code means bundle with this entry point
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the numbers in the tree shaked section bigger than the UMD builds? I would have thought the UMD would be far bigger as it includes the dependencies...? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Treeshaked size is not gzipped. If you will see at minified sizes they are all bigger than treeshaked one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So without being able to dedupe anything the esm cost is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes + vendors. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Vendors? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 23472kb is the size without vendors and without production replacements |
||
"bundled": 174113, | ||
"minified": 88585, | ||
"gzipped": 22372, | ||
"bundled": 179908, | ||
"minified": 90873, | ||
"gzipped": 23472, | ||
"treeshaked": { | ||
"rollup": 76698, | ||
"webpack": 78485 | ||
"rollup": { | ||
"code": 75679, | ||
"import_statements": 733 | ||
}, | ||
"webpack": { | ||
"code": 77480 | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the diff on the dev branch on from master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please let me know:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can compare the last commit against the first commit in this PR. The first one is only snapshot update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's against master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just so i understand - if a user has no shared deps with the library then they take the 179kb bundle size. If they already have all the deps they get 75kb. Is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite. Bundled, minified, gzipped are sizes of what we provide in rollup config + terser + gzip.
So in production the library size with dependencies will be 121KB to parse and 33KB to load (minified umd).
If user already have all dependencies then the size will be 90KB to parse and 23KB to load subtract development stuff like
process.env.NODE_ENV
(size snapshot provides production replacement only for treeshaked size)Treeshaked size doesn't make a lot of sense for this library because as you said there is nothing unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be interesting to know what the lowest possible size gzip could be. Ie: if with process.env.NODE_ENV === production and with all dependencies de duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to do this here though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still a confused by this:
And how it relates to the other numbers