Skip to content

Commit fbdd1a3

Browse files
bring back cjs :S
1 parent 0a35a59 commit fbdd1a3

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • packages/plugin-vite/src

packages/plugin-vite/src/mod.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { devServer } from "./plugins/dev_server.ts";
1212
import { buildIdPlugin } from "./plugins/build_id.ts";
1313
import { clientSnapshot } from "./plugins/client_snapshot.ts";
1414
import { serverSnapshot } from "./plugins/server_snapshot.ts";
15+
import { patches } from "./plugins/patches.ts";
1516

1617
export 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),

0 commit comments

Comments
 (0)