File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ export interface Options {
43
43
script ?: Partial < SFCScriptCompileOptions >
44
44
template ?: Partial < SFCTemplateCompileOptions >
45
45
style ?: Partial < SFCStyleCompileOptions >
46
+ /**
47
+ * @deprecated the plugin now auto-detects whether it's being invoked for ssr.
48
+ */
49
+ ssr ?: boolean
46
50
}
47
51
48
52
export interface ResolvedOptions extends Options {
@@ -103,7 +107,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
103
107
}
104
108
} ,
105
109
106
- load ( id , ssr = false ) {
110
+ load ( id , ssr = ! ! options . ssr ) {
107
111
const { filename, query } = parseVueRequest ( id )
108
112
// select corresponding block for subpart virtual modules
109
113
if ( query . vue ) {
@@ -131,7 +135,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
131
135
}
132
136
} ,
133
137
134
- transform ( code , id , ssr = false ) {
138
+ transform ( code , id , ssr = ! ! options . ssr ) {
135
139
const { filename, query } = parseVueRequest ( id )
136
140
if ( ! query . vue && ! filter ( filename ) ) {
137
141
return
You can’t perform that action at this time.
0 commit comments