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

[building-webpack] Consider removing async function transformation #140

Closed
LarsDenBakker opened this issue Jan 20, 2019 · 5 comments
Closed
Labels

Comments

@LarsDenBakker
Copy link
Member

In our webpack setup we use the fast-async plugin to compile async functions. However that makes it always kick in. Based on: https://caniuse.com/#search=async%20function any browser which supports type="module" supports async functions.

Probably we can remove this transform, but we should properly test this.

@LarsDenBakker LarsDenBakker changed the title Consider removing async function transformation [building-webpack] Consider removing async function transformation Jan 21, 2019
@thepassle
Copy link
Member

I tested this by removing:
@open-wc/building-webpack/default-config.js:131

'module:fast-async',

and adding:

async asyncFunction() {
  await new Promise(resolve => setTimeout(resolve, 500));
}
asyncFunction();

to my demo app.

I tested on the following browsers (on browserstack):

  • firefox 62 and up
  • chrome 69 and up
  • opera 55 and up
  • edge 15 and up
  • safari 10.1

where everything works.

Bundlesize savings:

with fast-async
27.9 kb

without fast-async
27.4 kb

@LarsDenBakker
Copy link
Member Author

Thats great, thanks for testing! Performance is probably better too.

@thepassle
Copy link
Member

Very slightly, yeah

@stale
Copy link

stale bot commented Mar 10, 2019

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Mar 10, 2019
@stale
Copy link

stale bot commented Apr 9, 2019

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Open Web Components!

@stale stale bot closed this as completed Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants