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

fix: inject esm/cjs shims and fix import.meta compilation #22

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

duniul
Copy link
Owner

@duniul duniul commented Aug 7, 2023

Fixes #21

Context

Programmatic usage with with CJS is causing crashes because import.meta.url doesn't get transpiled into something that works for CJS. See #21.

Changes

  • set shims: true in the tsup config
  • pass import.meta.url instead of import.meta so tsup detects it as a URL

@duniul duniul merged commit efa65b5 into main Aug 7, 2023
7 checks passed
@duniul duniul deleted the inject-shims branch August 7, 2023 08:37
@github-actions github-actions bot mentioned this pull request Aug 7, 2023
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.

is there import.meta' in cjs?
1 participant