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

Use import() for espree #13278

Closed
wants to merge 1 commit into from
Closed

Conversation

sosukesuzuki
Copy link
Member

@sosukesuzuki sosukesuzuki commented Aug 12, 2022

Description

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker
Copy link
Sponsor Member

fisker commented Aug 12, 2022

Size Change: +224 kB (+1%)

Total Size: 15.3 MB

Filename Size Change
./dist/esm/parser-espree.mjs 251 kB +112 kB (+81%) 🆘
./dist/parser-espree.js 251 kB +112 kB (+81%) 🆘

@sosukesuzuki
Copy link
Member Author

I've just knew why bundle size is increased. parser-espree depends on espree(ESM). espree(ESM) depends on acorn (ESM). But, parser-acorn depends on acorn (CJS). So both acorn(ESM) and acorn( CJS) are bundled to dist/parser-espree.js.

It would be best to wait for ESM support in acorn-jsx before resuming this work.

@sosukesuzuki sosukesuzuki deleted the import-espree branch August 12, 2022 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants