Skip to content
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

Use native es6 map, filter to reduce the size of the bundle #5

Closed
stereobooster opened this issue Jan 9, 2018 · 6 comments
Closed

Comments

@stereobooster
Copy link

stereobooster commented Jan 9, 2018

Use browserslist field to identify targeted browsers and automatic polyfill (not sure if there is a feature for that in TypeScript, but this is supported by Babel)

https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore

@jeffijoe
Copy link
Owner

jeffijoe commented Jan 9, 2018

TS does not support toggling specified ES6 features, it's either ES6 or not ES6.

I'd like to use Rollup to ship multiple builds (commonjs, modules and umd) but at the moment I don't have the time to do it.

Do you have any suggestions how to tackle this? A PR is welcome. :)

@stereobooster
Copy link
Author

Do you have any suggestions how to tackle this?

I have no actionable plan yet. I'll give it a try when I have time.

There is engines field in package.json, so I know your expectation about node.js version. Do you have any expectations about browser support?

@jeffijoe
Copy link
Owner

Haven't given browser support much thought since it spits out ES5 haha 😄

What's the standard?

@stereobooster
Copy link
Author

It depends. You can, for example, choose the same browsers as React support or any other big library.

@jeffijoe
Copy link
Owner

Yeah, probably gonna pick the same set of browsers as MobX if we do this.

@jeffijoe
Copy link
Owner

Come to think of it, AFAIK Lodash implements the most efficient versions of these functions, so I think that's another reason to keep them around.

Closing for now. If there are others who think we should favor a smaller bundle, please let me know and I'll reconsider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants