From aea6b3ccb78bcf106405706109e5e4997c1a242a Mon Sep 17 00:00:00 2001 From: Sai Maheshwar <61627080+SaiMaheshwarReddy@users.noreply.github.com> Date: Sat, 8 Jul 2023 20:05:31 +0530 Subject: [PATCH] fix: Preact build doesn't work due to incorrect Preact imports (#235) Co-authored-by: G Sai Maheshwar Reddy BREAKING CHANGE: Switch preact build to use preact/compat --- src/config/babelrc.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/babelrc.js b/src/config/babelrc.js index 06011138..b1ae08d0 100644 --- a/src/config/babelrc.js +++ b/src/config/babelrc.js @@ -19,7 +19,10 @@ const isCJS = BUILD_FORMAT === 'cjs' const isWebpack = parseEnv('BUILD_WEBPACK', false) const isMinify = parseEnv('BUILD_MINIFY', false) const treeshake = parseEnv('BUILD_TREESHAKE', isRollup || isWebpack) -const alias = parseEnv('BUILD_ALIAS', isPreact ? {react: 'preact'} : null) +const alias = parseEnv( + 'BUILD_ALIAS', + isPreact ? {react: 'preact/compat'} : null, +) const hasBabelRuntimeDep = Boolean( pkg.dependencies && pkg.dependencies['@babel/runtime'],