Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc authored Jan 16, 2022
1 parent 166554e commit 00aa4af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
},

configResolved(config) {
needHmr = config.command === 'serve' && !config.isProduction && options.hot !== false;
needHmr = config.command === 'serve' && config.mode !== 'production' && options.hot !== false;
},

resolveId(id) {
Expand Down Expand Up @@ -336,7 +336,7 @@ export default function solidPlugin(options: Partial<Options> = {}): Plugin {
filename: id,
sourceFileName: id,
presets: [[solid, { ...solidOptions, ...(options.solid || {}) }]],
plugins: needHmr && !isSsr && !inNodeModules ? [[solidRefresh, { bundler: 'vite' }]] : undefined,
plugins: needHmr && !isSsr && !inNodeModules ? [[solidRefresh, { bundler: 'vite' }]] : [],
sourceMaps: true,
// Vite handles sourcemap flattening
inputSourceMap: false as any,
Expand Down

0 comments on commit 00aa4af

Please sign in to comment.