Skip to content

Commit aea6b3c

Browse files
fix: Preact build doesn't work due to incorrect Preact imports (#235)
Co-authored-by: G Sai Maheshwar Reddy <[email protected]> BREAKING CHANGE: Switch preact build to use preact/compat
1 parent 4b50543 commit aea6b3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/config/babelrc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ const isCJS = BUILD_FORMAT === 'cjs'
1919
const isWebpack = parseEnv('BUILD_WEBPACK', false)
2020
const isMinify = parseEnv('BUILD_MINIFY', false)
2121
const treeshake = parseEnv('BUILD_TREESHAKE', isRollup || isWebpack)
22-
const alias = parseEnv('BUILD_ALIAS', isPreact ? {react: 'preact'} : null)
22+
const alias = parseEnv(
23+
'BUILD_ALIAS',
24+
isPreact ? {react: 'preact/compat'} : null,
25+
)
2326

2427
const hasBabelRuntimeDep = Boolean(
2528
pkg.dependencies && pkg.dependencies['@babel/runtime'],

0 commit comments

Comments
 (0)