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

docs: esm #328

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,18 @@ browsers:
webgl.force-enabled: true
```

## ESM Support

By default airtap doesn't support ESM, but you can configure it to work with ESM and CJS using the following config:
```yml
browserify:
- transform: babelify
global: true
presets: ['@babel/preset-env']
plugins: ['@babel/plugin-syntax-import-assertions']
```
You'll need to install `babelify`, `@babel/present-env` and `@babel/plugin-syntax-import-assertions`. Note that other global browserify configs might break this and that the `global` parameter might not be required.
ThaUnknown marked this conversation as resolved.
Show resolved Hide resolved

## Who Uses Airtap?

**Lots of folks!** Collectively, packages that depend on Airtap get 100's of millions of downloads per month!
Expand Down