@@ -115,32 +115,31 @@ export const reactRouterDevTools: (args?: ReactRouterViteConfig) => Plugin[] = (
115115 return injectRdtClient ( code , config , pluginImports , id )
116116 } ,
117117 } ,
118-
119118 {
120- name : "react-router-devtools-data-function-augment " ,
119+ name : "react-router-devtools-inject-context " ,
121120 apply ( config ) {
122- return shouldInject ( config . mode , includeServer )
121+ return shouldInject ( config . mode , includeDevtools )
123122 } ,
124123 transform ( code , id ) {
125124 const routeId = isTransformable ( id )
126125 if ( ! routeId ) {
127126 return
128127 }
129- const finalCode = augmentDataFetchingFunctions ( code , routeId , id )
128+ const finalCode = injectContext ( code , routeId , id )
130129 return finalCode
131130 } ,
132131 } ,
133132 {
134- name : "react-router-devtools-inject-context " ,
133+ name : "react-router-devtools-data-function-augment " ,
135134 apply ( config ) {
136- return shouldInject ( config . mode , includeDevtools )
135+ return shouldInject ( config . mode , includeServer )
137136 } ,
138137 transform ( code , id ) {
139138 const routeId = isTransformable ( id )
140139 if ( ! routeId ) {
141140 return
142141 }
143- const finalCode = injectContext ( code , routeId , id )
142+ const finalCode = augmentDataFetchingFunctions ( code , routeId , id )
144143 return finalCode
145144 } ,
146145 } ,
0 commit comments