Skip to content

Commit b289b2d

Browse files
authored
fix(plugin-vue): compiler is null on rollup (#6566)
1 parent 56d84fb commit b289b2d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/plugin-vue/src/index.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
9797
reactivityTransform,
9898
root: process.cwd(),
9999
sourceMap: true,
100-
compiler: null as any // to be set in configResolved
100+
compiler: null as any // to be set in buildStart
101101
}
102102

103103
// Temporal handling for 2.7 breaking change
@@ -135,15 +135,18 @@ export default function vuePlugin(rawOptions: Options = {}): Plugin {
135135
...options,
136136
root: config.root,
137137
sourceMap: config.command === 'build' ? !!config.build.sourcemap : true,
138-
isProduction: config.isProduction,
139-
compiler: options.compiler || resolveCompiler(config.root)
138+
isProduction: config.isProduction
140139
}
141140
},
142141

143142
configureServer(server) {
144143
options.devServer = server
145144
},
146145

146+
buildStart() {
147+
options.compiler = options.compiler || resolveCompiler(options.root)
148+
},
149+
147150
async resolveId(id) {
148151
// component export helper
149152
if (id === EXPORT_HELPER_ID) {

0 commit comments

Comments
 (0)