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

Optimize build artifact #82

Open
zxqx opened this issue Oct 4, 2019 · 3 comments
Open

Optimize build artifact #82

zxqx opened this issue Oct 4, 2019 · 3 comments
Assignees
Labels
optimization Performance or build optimization

Comments

@zxqx
Copy link
Member

zxqx commented Oct 4, 2019

Update our babel-plugin-transform-runtime config to specify exactly which runtime polyfills the library needs.

Currently we're using defaults:

{
  absoluteRuntime: false,
  corejs: false,
  helpers: true,
  regenerator: true,
  useESModules: false
}

We could maybe use babel-plugin-transform-regenerator to more granularly specify runtime transforms.

@zxqx zxqx self-assigned this Oct 7, 2019
@zxqx zxqx changed the title Specify exact runtime polyfills Optimize build artifact Oct 7, 2019
@zxqx
Copy link
Member Author

zxqx commented Oct 7, 2019

We may want to consider one of these two options:

  1. Use Promise instead of async/await in useBaseAxios
  2. Use something like babel-plugin-transform-async-to-promises to transform async/await to native Promise calls to remove the need for regenerator runtime

Ran a few test builds and it looks like either one of these will reduce the build artifact size by 25-30%.

@zxqx zxqx added the optimization Performance or build optimization label Oct 8, 2019
@therealparmesh
Copy link
Collaborator

If we implement #97, I think we would just need to specify a node target in the @babel/preset-env config along with a browserslist entry in package.json and the rest should be taken care of (in theory 😄 ).

@zxqx
Copy link
Member Author

zxqx commented Dec 19, 2019

That would be sick - will do a comparison of the current build artifact size vs. the one generated by pika and report back.

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

No branches or pull requests

2 participants