vue-google-maps
vue-google-maps copied to clipboard
[Poll] What is the "right" build
Hello,
For the moment we have 2 dependencies:
- Q
- Lodash
Some people already these libraries, so it's not a problem, some others don't (#44 #55), therefore they are loading too much. I don't see how it's possible to satisfy everyone's need by doing a build for every case:
- Q + lodash included, and optimized
- lodash included and optimized
- Q included
- Nothing included
- Npm build for webpack/browserify
In this case it starts getting messy.
Does anyone know the usual solution to tackle this problem ? Would you like to have all different builds and pick the one you need ?
I thank you in advance for your participation.
I don't know the solution, but please, keep it simple :)
The simplest would be the "everything included" one. That means you don't have anything to include as a dependency. Maybe simplicity is better than performance. Actually I think this solution might also be the most effective in average case
Is going dependency-free an option to consider?
@rjoo "Q + lodash included, and optimized" means dependency free. And this is considered by this Poll
This is the package size decomposition with all dependencies included:
lodash: 76.45 KB (25.0%)
q: 61.31 KB (20.1%)
core-js: 40.68 KB (13.3%)
js-marker-clusterer: 32.39 KB (10.6%)
util: 15.4 KB (5.04%)
assert: 11.43 KB (3.74%)
style-loader: 7.04 KB (2.31%)
timers-browserify: 2.06 KB (0.673%)
process: 2.01 KB (0.658%)
css-loader: 1.47 KB (0.482%)
inherits: 672 B (0.215%)
babel-runtime: 486 B (0.155%)
<self>: 53.96 KB (17.7%)
The current total size is : 101kb, 30kb gzipped, It's a little more than what I expected. To improve it I could try to remove some lodash calls by raw javascript if there are not any browser compatibilities issues.
As stated in #57, if you know a lighter promise implementation than Q, please let me know.
Thanks
You could try rollup seems to be better for bundling then webpack and browserify.
Thank you @apertureless. I will take a look at it. reading the readme made me think we could just remove the npm build for webpack and add a jsnext:main entry in the package.json.
Is it a good idea ?