File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
packages/vite/src/node/plugins Expand file tree Collapse file tree 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 {
512512 return cssBundleName
513513 }
514514
515- return {
515+ const plugin = {
516516 name : 'vite:css-post' ,
517517
518518 renderStart ( ) {
@@ -1080,7 +1080,14 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
10801080 }
10811081 }
10821082 } ,
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
10841091}
10851092
10861093export function cssAnalysisPlugin ( config : ResolvedConfig ) : Plugin {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function jsonPlugin(
4141 options : Required < JsonOptions > ,
4242 isBuild : boolean ,
4343) : Plugin {
44- return {
44+ const plugin = {
4545 name : 'vite:json' ,
4646
4747 transform : {
@@ -119,7 +119,14 @@ export function jsonPlugin(
119119 }
120120 } ,
121121 } ,
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
123130}
124131
125132function serializeValue ( value : unknown ) : string {
You can’t perform that action at this time.
0 commit comments