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

Custom build with browserslist #449

Closed
fenderil opened this issue Nov 2, 2018 · 4 comments
Closed

Custom build with browserslist #449

fenderil opened this issue Nov 2, 2018 · 4 comments

Comments

@fenderil
Copy link

fenderil commented Nov 2, 2018

Hi there.

How about modify core-js-builder with browserslist and caniuse-db (or some other feature db)? It's would be useful to exclude some imports, that don't need to be polyfiiled.

@zloirock
Copy link
Owner

  • I don't think that this issue in the scope of core-js-builder. My position - it's a legacy feature for cases when you should exclude something certain from core-js. Something like Breaks Number matching in Meteor #38. In other cases, it would be better just import required core-js features to your code and use something like webpack.
  • caniuse-db is a bad data source for this data.
  • You could try @babel/preset-env with useBuiltIns option. Seems it's what you need. However, @babel/preset-env use compat-table which also is not a good data source for that.
  • Need to think about an alternative core-js-oriented data source for that and, maybe, about a better solution for providing polyfills, required only for target engines.

@fenderil
Copy link
Author

  • Fine. On the other hand I had an idea about json generation, that includes only required and unsupported features.
  • Yeah, caniuse-db is not so good.
  • I had seen this. It's looks like what I need, but not. :) I need to generate features pack for single injection on document start, for reuses between modules and pages with window.history and different bundles. But why compat-table is not a good data source? Just interesting.
  • I think there could be detached package, that definitely know all relations between features and engines, and this package generate json meta with usage of browserslist and unused_feature_list.

I can pick it for implementation.

@zloirock
Copy link
Owner

@fenderil sorry, I missed your answer.

#466 fixes this issue. Also, in this PR you can find argumentation.

@fenderil
Copy link
Author

That is what i expected.

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