Skip to content

Commit 1e08c92

Browse files
committed
enable exclude in vite config
1 parent bead78a commit 1e08c92

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vite-plugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ interface Options {
1919
entry: string
2020
adapter?: () => Adapter | Promise<Adapter>
2121
getLoadContext?: GetLoadContext
22+
exclude?: (string | RegExp)[]
2223
}
2324

2425
export default (options: Options): Plugin => {
2526
return devServer({
2627
adapter: options?.adapter,
2728
entry: options.entry,
28-
exclude: [...defaultOptions.exclude, '/assets/**', '/app/**'],
29+
exclude: options?.exclude ?? [...defaultOptions.exclude, '/assets/**', '/app/**'],
2930
injectClientScript: false,
3031
loadModule: async (server, entry) => {
3132
const appModule = await server.ssrLoadModule(entry)

0 commit comments

Comments
 (0)