@vitejs/plugin-legacy 1.6.0 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/index.js +18 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
## [1.6.4](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.3...plugin-legacy@1.6.4) (2021-12-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## [1.6.3](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.2...plugin-legacy@1.6.3) (2021-11-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **build:** resolve `rollupOptions.input` paths ([#5601](https://github.com/vitejs/vite/issues/5601)) ([5b6b016](https://github.com/vitejs/vite/commit/5b6b01693720290e8998b2613f0dcb2d699ee84f))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.6.2](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.1...plugin-legacy@1.6.2) (2021-10-11)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add `build.cssTarget` option ([#5132](https://github.com/vitejs/vite/issues/5132)) ([b17444f](https://github.com/vitejs/vite/commit/b17444fd97b02bc54410c8575e7d3cb25e4058c2)), closes [#4746](https://github.com/vitejs/vite/issues/4746) [#5070](https://github.com/vitejs/vite/issues/5070) [#4930](https://github.com/vitejs/vite/issues/4930)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [1.6.1](https://github.com/vitejs/vite/compare/plugin-legacy@1.6.0...plugin-legacy@1.6.1) (2021-10-05)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **plugin-legacy:** use terser as the default minifier ([#5168](https://github.com/vitejs/vite/issues/5168)) ([9ee7234](https://github.com/vitejs/vite/commit/9ee72343884a7d679767833f7a659bbca6b96595))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
1
32
|
# [1.6.0](https://github.com/vitejs/vite/compare/plugin-legacy@1.5.3...plugin-legacy@1.6.0) (2021-09-29)
|
|
2
33
|
|
|
3
34
|
|
package/index.js
CHANGED
|
@@ -86,6 +86,15 @@ function viteLegacyPlugin(options = {}) {
|
|
|
86
86
|
if (!config.build) {
|
|
87
87
|
config.build = {}
|
|
88
88
|
}
|
|
89
|
+
|
|
90
|
+
if (!config.build.cssTarget) {
|
|
91
|
+
// Hint for esbuild that we are targeting legacy browsers when minifying CSS.
|
|
92
|
+
// Full CSS compat table available at https://github.com/evanw/esbuild/blob/78e04680228cf989bdd7d471e02bbc2c8d345dc9/internal/compat/css_table.go
|
|
93
|
+
// But note that only the `HexRGBA` feature affects the minify outcome.
|
|
94
|
+
// HSL & rebeccapurple values will be minified away regardless the target.
|
|
95
|
+
// So targeting `chrome61` suffices to fix the compatiblity issue.
|
|
96
|
+
config.build.cssTarget = 'chrome61'
|
|
97
|
+
}
|
|
89
98
|
}
|
|
90
99
|
}
|
|
91
100
|
|
|
@@ -96,6 +105,14 @@ function viteLegacyPlugin(options = {}) {
|
|
|
96
105
|
name: 'vite:legacy-generate-polyfill-chunk',
|
|
97
106
|
apply: 'build',
|
|
98
107
|
|
|
108
|
+
config() {
|
|
109
|
+
return {
|
|
110
|
+
build: {
|
|
111
|
+
minify: 'terser'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
|
|
99
116
|
configResolved(config) {
|
|
100
117
|
if (!config.build.ssr && genLegacy && config.build.minify === 'esbuild') {
|
|
101
118
|
throw new Error(
|
|
@@ -579,7 +596,7 @@ async function buildPolyfillChunk(
|
|
|
579
596
|
bundle[polyfillChunk.name] = polyfillChunk
|
|
580
597
|
}
|
|
581
598
|
|
|
582
|
-
const polyfillId = '
|
|
599
|
+
const polyfillId = '\0vite/legacy-polyfills'
|
|
583
600
|
|
|
584
601
|
/**
|
|
585
602
|
* @param {Set<string>} imports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-legacy",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Evan You",
|
|
6
6
|
"files": [
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"types": "index.d.ts",
|
|
12
12
|
"scripts": {
|
|
13
13
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package plugin-legacy",
|
|
14
|
-
"release": "node ../../scripts/release.
|
|
14
|
+
"release": "node ../../scripts/release.cjs --skipBuild"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=12.0.0"
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#readme",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@babel/standalone": "^7.
|
|
30
|
-
"core-js": "^3.
|
|
29
|
+
"@babel/standalone": "^7.16.4",
|
|
30
|
+
"core-js": "^3.19.1",
|
|
31
31
|
"magic-string": "^0.25.7",
|
|
32
32
|
"regenerator-runtime": "^0.13.9",
|
|
33
|
-
"systemjs": "^6.
|
|
33
|
+
"systemjs": "^6.11.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"vite": "^2.0.0"
|