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

Add IIFE external notice #1257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add IIFE external notice #1257

wants to merge 1 commit into from

Conversation

rougsig
Copy link

@rougsig rougsig commented Dec 7, 2024

I spend near a day to understand why i see ERROR: Could not resolve, when a mark as external all imports except entry points with ^(?!index\.ts$).* regexp. Just add a notice, that is not supported.

I found that in the source code of tsup, so i can prove it just not works with IIFE output.

https://github.com/egoist/tsup/blob/main/src/esbuild/index.ts#L134

format !== 'iife' &&
      externalPlugin({
        external,
        noExternal: options.noExternal,
        skipNodeModulesBundle: options.skipNodeModulesBundle,
        tsconfigResolvePaths: options.tsconfigResolvePaths,
      }),

I copy-pasted plugin, and import bundle-require and it works.

Copy link

codesandbox bot commented Dec 7, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Dec 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 6:21pm

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