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: error when type is module #3

Closed
wants to merge 1 commit into from

Conversation

linesoft2
Copy link

@linesoft2 linesoft2 commented Mar 10, 2023

Description

The code packaged by fast-glob uses CommonJS to reference the path module, while tsup, which uses esbuild, replaces require with the __require shim in the generated .mjs file. When a built-in Node module is referenced, an error such as Error: Dynamic require of 'path' is not supported will occur. To solve this problem, you can add a banner to tsup's options, and for specific changes, please refer to File Change.

Linked Issues

#2

Additional context

I'm sorry, please forgive me. 🙏

@stackblitz
Copy link

stackblitz bot commented Mar 10, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@linesoft2 linesoft2 changed the title fix: error-when-type-is-module fix: error when type is module Mar 10, 2023
@sxzz sxzz closed this in f5c6933 Mar 10, 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.

1 participant