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
Move all modules to a single file #282
Conversation
Codecov Report
@@ Coverage Diff @@
## master #282 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 5 1 -4
Lines 188 185 -3
=====================================
- Hits 188 185 -3
Continue to review full report at Codecov.
|
Correct me if I'm wrong, wouldn't it prevent tree shaking because now everything is in one module? |
@sapegin Importing from different files is not tree shaking. Bundler is smart enough to omit unused stuff from each module. |
@jxnblk I'm okay with this if you don't want to introduce rollup. However size-snapshot plugin is necessary to test treeshakability you want to achieve. If you want I could release standalone version. |
Yeah, a dev tool for testing treeshakability is a nice to have
^^ by this do you mean add a plain Node/CLI API to the plugin? or did I misunderstand? |
Yes just a simple command which will wrap rollup+size snapshot plugin |
@jxnblk maybe https://github.com/developit/microbundle would be better than rollup for this? |
@flybayer microbundle is rollup but with some opinionated stuff included. |
@flybayer Yeah, I've tried microbundle (like it conceptually) but doesn't seem to work super well across the packages I've tried it on |
Moves all source code into a single file, for my sanity.
@TrySound I'm curious to know if this is a viable option to the problem that #258 attempts to solve (with the addition of some babel config changes and updates to the
prepare
step) – also riffing off of what you did in rebassjs/components#2I'll likely merge this in regardless, but to clarify the hesitation with adding rollup to all the packages I maintain, I see it like this:
Ideally, packages like this could be written in a standard that wouldn't require any build setup at all, but I understand that we aren't there yet. Any guidance on this would be much appreciated