Skip to content

Commit

Permalink
docs(plugin-legacy): add note about IE11, close #3362 (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalgonsalves authored May 12, 2021
1 parent 67a6441 commit b0b62f9
Showing 1 changed file with 17 additions and 1 deletion.
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

0 comments on commit b0b62f9

Please sign in to comment.