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

docs(plugin-legacy): add note about IE11, close #3362 #3389

Merged
merged 1 commit into from
May 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion packages/plugin-legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,22 @@ export default {
}
```

When targeting IE11, you also need `regenerator-runtime`:

```js
// vite.config.js
import legacy from '@vitejs/plugin-legacy'

export default {
plugins: [
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
})
]
}
```

## Options

### `targets`
Expand Down Expand Up @@ -57,7 +73,7 @@ export default {

Add custom imports to the legacy polyfills chunk. Since the usage-based polyfill detection only covers ES language features, it may be necessary to manually specify additional DOM API polyfills using this option.

Note: if additional plyfills are needed for both the modern and legacy chunks, they can simply be imported in the application source code.
Note: if additional polyfills are needed for both the modern and legacy chunks, they can simply be imported in the application source code.

### `ignoreBrowserslistConfig`

Expand Down