Skip to content

Commit 1026e36

Browse files
sapphi-redmoonlitusun
authored andcommitted
refactor: remove options?.ssr support in clientInjectionsPlugin (vitejs#19589)
1 parent 8266929 commit 1026e36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/vite/src/node/plugins/clientInjections.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ export function clientInjectionsPlugin(config: ResolvedConfig): Plugin {
9494
.replace(`__WS_TOKEN__`, wsTokenReplacement)
9595
}
9696
},
97-
async transform(code, id, options) {
98-
// TODO: Remove options?.ssr, Vitest currently hijacks this plugin
99-
const ssr = options?.ssr ?? this.environment.config.consumer === 'server'
97+
async transform(code, id) {
98+
const ssr = this.environment.config.consumer === 'server'
10099
if (id === normalizedClientEntry || id === normalizedEnvEntry) {
101100
const defineReplacer = getDefineReplacer(this)
102101
return defineReplacer(injectConfigValues(code))

0 commit comments

Comments
 (0)