We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
options?.ssr
1 parent 8266929 commit 1026e36Copy full SHA for 1026e36
packages/vite/src/node/plugins/clientInjections.ts
@@ -94,9 +94,8 @@ export function clientInjectionsPlugin(config: ResolvedConfig): Plugin {
94
.replace(`__WS_TOKEN__`, wsTokenReplacement)
95
}
96
},
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'
+ async transform(code, id) {
+ const ssr = this.environment.config.consumer === 'server'
100
if (id === normalizedClientEntry || id === normalizedEnvEntry) {
101
const defineReplacer = getDefineReplacer(this)
102
return defineReplacer(injectConfigValues(code))
0 commit comments