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

Set up Babel transpilation for browser compatibility #3504

Closed
1 task done
Tracked by #2639 ...
romaricpascal opened this issue Apr 14, 2023 · 2 comments · Fixed by #3820
Closed
1 task done
Tracked by #2639 ...

Set up Babel transpilation for browser compatibility #3504

romaricpascal opened this issue Apr 14, 2023 · 2 comments · Fixed by #3820

Comments

@romaricpascal
Copy link
Member

romaricpascal commented Apr 14, 2023

What

Set up Babel transpilation using @babel/preset-env to transform modern JavaScript code so it runs without errors in <script type="module"> ES module scripts (see .browserlistrc supported browsers).

Polyfill libraries like core-js can be considered later.

Why

We want to maximise the chances of JavaScript running properly in browsers that will load our JavaScript.

Transformed code should not cause parsing or syntax errors. Since feature detection can guard against code we choose not to run, unsupported browser APIs don't have to be transformed.

Who needs to work on this

Developers

Who needs to review this

Developers

Depends on

Done when

@colinrotherham colinrotherham changed the title Set up transpilation and polyfilling Set up Babel transpilation for browser compatibility Jul 11, 2023
@colinrotherham
Copy link
Contributor

This issue previously included browser polyfills

Since we don't currently have the issue's been split out into:

@colinrotherham
Copy link
Contributor

Linking the PR to enable Babel transforms:

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

Successfully merging a pull request may close this issue.

2 participants