Skip to content

Commit

Permalink
fix(vite): watch only on watch mode
Browse files Browse the repository at this point in the history
  • Loading branch information
panvourtsis committed Jun 26, 2024
1 parent 1dbcb49 commit 24e7db8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ export default defineConfig(({ mode }) => {
},
plugins: mode === 'watch' ? [...plugins, viteOnBuildSuccess()] : plugins,
build: {
watch: {
include: 'src/**',
},
watch:
mode === 'watch'
? {
include: 'src/**',
}
: undefined,
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
name: pkg.name,
Expand Down

0 comments on commit 24e7db8

Please sign in to comment.