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

feat: align with @vitejs/plugin-legacy 5.3.2 #8

Merged
merged 3 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,23 @@ export default {
- **Type:** `string | string[] | { [key: string]: string }`
- **Default:** [`'last 2 versions and not dead, > 0.3%, Firefox ESR'`](https://browsersl.ist/#q=last+2+versions+and+not+dead%2C+%3E+0.3%25%2C+Firefox+ESR)

If explicitly set, it's passed on to [`@swc/core`](https://swc.rs/docs/configuration/supported-browsers#targets).
If explicitly set, it's passed on to [`@swc/core`](https://swc.rs/docs/configuration/supported-browsers#targets) when rendering **legacy chunks**.

The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.

If it's not set, plugin-legacy will load [the browserslist config sources](https://github.com/browserslist/browserslist#queries) and then fallback to the default value.

### `modernTargets`

- **Type:** `string | string[]`
- **Default:** [`'edge>=79, firefox>=67, chrome>=64, safari>=12, chromeAndroid>=64, iOS>=12'`](https://browsersl.ist/#q=edge%3E%3D80%2C+firefox%3E%3D72%2C+chrome%3E%3D80%2C+safari%3E%3D13.1%2C+chromeAndroid%3E%3D80%2C+iOS%3E%3D13.1)

If explicitly set, it's passed on to [`@swc/core`](https://swc.rs/docs/configuration/supported-browsers#targets) when rendering **modern chunks**.

The query is also [Browserslist compatible](https://github.com/browserslist/browserslist). See [Browserslist Best Practices](https://github.com/browserslist/browserslist#best-practices) for more details.

If it's not set, plugin-legacy will fallback to the default value.

### `polyfills`

- **Type:** `boolean | string[]`
Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,27 @@
},
"homepage": "https://github.com/CyanSalt/vite-plugin-legacy-swc#readme",
"dependencies": {
"@swc/core": "^1.3.100",
"browserslist": "^4.22.2",
"core-js": "^3.34.0",
"magic-string": "^0.30.5",
"regenerator-runtime": "^0.14.0",
"systemjs": "^6.14.2"
"@swc/core": "^1.4.7",
"browserslist": "^4.23.0",
"browserslist-to-esbuild": "^2.1.1",
"core-js": "^3.36.0",
"magic-string": "^0.30.8",
"regenerator-runtime": "^0.14.1",
"systemjs": "^6.14.3"
},
"devDependencies": {
"@cyansalt/eslint-config-preset": "^1.17.0",
"@cyansalt/eslint-config-preset": "^1.18.0",
"@cyansalt/tsconfig": "^2.2.1",
"@release-it/conventional-changelog": "^8.0.1",
"@types/node": "^20.10.4",
"acorn": "^8.11.2",
"@types/node": "^20.11.26",
"acorn": "^8.11.3",
"picocolors": "^1.0.0",
"release-it": "^17.0.0",
"rollup": "^4.6.1",
"typescript": "^5.3.3",
"release-it": "^17.1.1",
"rollup": "^4.13.0",
"typescript": "^5.4.2",
"unbuild": "^2.0.0",
"vite": "^5.0.6",
"vitest": "^1.0.2"
"vite": "^5.1.6",
"vitest": "^1.3.1"
},
"peerDependencies": {
"vite": ">=4.0.0"
Expand Down
Loading