Skip to content

Commit 3bc76e8

Browse files
committed
hotfix: preact aliasing
1 parent 06f981e commit 3bc76e8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/generators/web/utils/bundle.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ export default async function bundleCode(codeMap, { server = false } = {}) {
8484
resolve: {
8585
// Alias react imports to preact/compat for smaller bundle sizes.
8686
// Explicit jsx-runtime aliases are required for the automatic JSX transform.
87-
alias: { react: 'preact/compat' },
87+
alias: {
88+
react: 'preact/compat',
89+
'react-dom': 'preact/compat',
90+
},
8891

8992
// Tell the bundler where to find node_modules.
9093
// This ensures packages are found when running doc-kit from external directories

0 commit comments

Comments
 (0)