File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
290
290
} ,
291
291
292
292
configResolved ( config ) {
293
- needHmr = config . command === 'serve' && ! config . isProduction && options . hot !== false ;
293
+ needHmr = config . command === 'serve' && config . mode !== 'production' && options . hot !== false ;
294
294
} ,
295
295
296
296
resolveId ( id ) {
@@ -336,7 +336,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
336
336
filename : id ,
337
337
sourceFileName : id ,
338
338
presets : [ [ solid , { ...solidOptions , ...( options . solid || { } ) } ] ] ,
339
- plugins : needHmr && ! isSsr && ! inNodeModules ? [ [ solidRefresh , { bundler : 'vite' } ] ] : undefined ,
339
+ plugins : needHmr && ! isSsr && ! inNodeModules ? [ [ solidRefresh , { bundler : 'vite' } ] ] : [ ] ,
340
340
sourceMaps : true ,
341
341
// Vite handles sourcemap flattening
342
342
inputSourceMap : false as any ,
You can’t perform that action at this time.
0 commit comments