Skip to content

Commit

Permalink
feat: add custom Rollup warning handler in Vite configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ism1tha committed Jan 28, 2025
1 parent b20a53e commit 43bcc86
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ export default defineConfig({
refresh: true,
}),
],
build: {
rollupOptions: {
onwarn(warning, warn) {
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
return
}
warn(warning)
},
},
},
});

0 comments on commit 43bcc86

Please sign in to comment.