Skip to content

Commit 5b061ed

Browse files
fix: don't externalize packages on ssr
1 parent 0006c47 commit 5b061ed

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

packages/plugin-vite/src/mod.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ export function fresh(config?: FreshViteConfig): Plugin[] {
3838
"react-dom": "preact/compat",
3939
react: "preact/compat",
4040
},
41-
noExternal: true,
4241
},
4342
optimizeDeps: {
4443
include: [

packages/plugin-vite/src/plugins/patches.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Plugin } from "vite";
22
import * as babel from "@babel/core";
3-
import { cjsPlugin } from "./commonjs.ts";
43
import { npmWorkaround } from "./npm_workaround.ts";
54

65
export function patches(): Plugin {
@@ -13,7 +12,7 @@ export function patches(): Plugin {
1312
const res = babel.transformSync(code, {
1413
filename: id,
1514
babelrc: false,
16-
plugins: [npmWorkaround, cjsPlugin],
15+
plugins: [npmWorkaround],
1716
});
1817

1918
if (res?.code) {

0 commit comments

Comments
 (0)