File tree 2 files changed +3
-11
lines changed
2 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ function vueJsxPlugin(options: Options = {}): Plugin {
74
74
} ,
75
75
76
76
async transform ( code , id , opt ) {
77
- const ssr = typeof opt === 'boolean' ? opt : ( opt && opt . ssr ) === true
77
+ const ssr = opt ? .ssr === true
78
78
const {
79
79
include,
80
80
exclude,
Original file line number Diff line number Diff line change @@ -107,14 +107,6 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
107
107
devToolsEnabled : process . env . NODE_ENV !== 'production'
108
108
}
109
109
110
- // Temporal handling for 2.7 breaking change
111
- const isSSR = ( opt : { ssr ?: boolean } | boolean | undefined ) =>
112
- opt === undefined
113
- ? false
114
- : typeof opt === 'boolean'
115
- ? opt
116
- : opt ?. ssr === true
117
-
118
110
return {
119
111
name : 'vite:vue' ,
120
112
@@ -169,7 +161,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
169
161
} ,
170
162
171
163
load ( id , opt ) {
172
- const ssr = isSSR ( opt )
164
+ const ssr = opt ?. ssr === true
173
165
if ( id === EXPORT_HELPER_ID ) {
174
166
return helperCode
175
167
}
@@ -202,7 +194,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
202
194
} ,
203
195
204
196
transform ( code , id , opt ) {
205
- const ssr = isSSR ( opt )
197
+ const ssr = opt ?. ssr === true
206
198
const { filename, query } = parseVueRequest ( id )
207
199
if ( query . raw ) {
208
200
return
You can’t perform that action at this time.
0 commit comments