Skip to content

Commit

Permalink
fix: should use config
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jun 10, 2021
1 parent a94f212 commit 5ce19ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/react-ts/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import TsChecker from 'vite-plugin-ts-checker'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [reactRefresh(), TsChecker()],
plugins: [reactRefresh(), TsChecker({overlay: false})],
})
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ export default function Plugin(userOptions?: Partial<PluginOptions>): Plugin {
config: (config, { command }) => {
viteMode = command
if (viteMode === 'build') return

diagnose = createDiagnosis({
root: userOptions?.root,
tsconfigPath: userOptions?.tsconfigPath,
})
diagnose.config(config)
},
buildStart: (options) => {
if (viteMode === 'build') {
Expand Down

0 comments on commit 5ce19ec

Please sign in to comment.