egoist / egoist/tsup

How should I add globals like options to the iife format?

Open
#897 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

Hi, this is my use case

```ts
import { defineConfig } from 'tsup'

export default defineConfig({
format: ['cjs', 'esm', 'iife'],
external: ['vue'],
globalName: 'OverlayReact',
clean: true,
dts: true
})
```

It will package vue with a larger volume, while vue may be redefined by users as CDNs, which is not cost-effective

How should I add the following options?

```
globals: { 'vue': 'Vue' }
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.