Skip to content

Commit b0b62f9

Browse files
docs(plugin-legacy): add note about IE11, close #3362 (#3389)
1 parent 67a6441 commit b0b62f9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

packages/plugin-legacy/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,22 @@ export default {
2929
}
3030
```
3131

32+
When targeting IE11, you also need `regenerator-runtime`:
33+
34+
```js
35+
// vite.config.js
36+
import legacy from '@vitejs/plugin-legacy'
37+
38+
export default {
39+
plugins: [
40+
legacy({
41+
targets: ['ie >= 11'],
42+
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
43+
})
44+
]
45+
}
46+
```
47+
3248
## Options
3349

3450
### `targets`
@@ -57,7 +73,7 @@ export default {
5773

5874
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.
5975

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

6278
### `ignoreBrowserslistConfig`
6379

0 commit comments

Comments
 (0)