File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { devServer } from "./plugins/dev_server.ts";
1212import { buildIdPlugin } from "./plugins/build_id.ts" ;
1313import { clientSnapshot } from "./plugins/client_snapshot.ts" ;
1414import { serverSnapshot } from "./plugins/server_snapshot.ts" ;
15+ import { patches } from "./plugins/patches.ts" ;
1516
1617export function fresh ( config ?: FreshViteConfig ) : Plugin [ ] {
1718 const fConfig : ResolvedFreshViteConfig = {
@@ -38,6 +39,11 @@ export function fresh(config?: FreshViteConfig): Plugin[] {
3839 react : "preact/compat" ,
3940 } ,
4041 } ,
42+ optimizeDeps : {
43+ // Optmize deps somehow leads to duplicate modules or them
44+ // being placed in the wrong chunks...
45+ noDiscovery : true ,
46+ } ,
4147
4248 publicDir : pathWithRoot ( "static" , config . root ) ,
4349
@@ -96,6 +102,7 @@ export function fresh(config?: FreshViteConfig): Plugin[] {
96102 } ,
97103 } ,
98104 serverEntryPlugin ( fConfig ) ,
105+ patches ( ) ,
99106 ...serverSnapshot ( fConfig ) ,
100107 clientEntryPlugin ( ) ,
101108 clientSnapshot ( fConfig ) ,
You can’t perform that action at this time.
0 commit comments