File tree 2 files changed +18
-4
lines changed
packages/vite/src/node/plugins
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -512,7 +512,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
512
512
return cssBundleName
513
513
}
514
514
515
- return {
515
+ const plugin = {
516
516
name : 'vite:css-post' ,
517
517
518
518
renderStart ( ) {
@@ -1080,7 +1080,14 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
1080
1080
}
1081
1081
}
1082
1082
} ,
1083
- }
1083
+ } satisfies Plugin
1084
+
1085
+ // backward compat
1086
+ const handler = plugin . transform . handler
1087
+ ; ( plugin as any ) . transform = handler
1088
+ ; ( plugin as any ) . transform . handler = handler
1089
+
1090
+ return plugin
1084
1091
}
1085
1092
1086
1093
export function cssAnalysisPlugin ( config : ResolvedConfig ) : Plugin {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function jsonPlugin(
41
41
options : Required < JsonOptions > ,
42
42
isBuild : boolean ,
43
43
) : Plugin {
44
- return {
44
+ const plugin = {
45
45
name : 'vite:json' ,
46
46
47
47
transform : {
@@ -119,7 +119,14 @@ export function jsonPlugin(
119
119
}
120
120
} ,
121
121
} ,
122
- }
122
+ } satisfies Plugin
123
+
124
+ // backward compat
125
+ const handler = plugin . transform . handler
126
+ ; ( plugin as any ) . transform = handler
127
+ ; ( plugin as any ) . transform . handler = handler
128
+
129
+ return plugin
123
130
}
124
131
125
132
function serializeValue ( value : unknown ) : string {
You can’t perform that action at this time.
0 commit comments