Skip to content

Commit

Permalink
fix: Preact build doesn't work due to incorrect Preact imports (#235)
Browse files Browse the repository at this point in the history
Co-authored-by: G Sai Maheshwar Reddy <saimaheshwar.reddy@impelsys.com>

BREAKING CHANGE: Switch preact build to use preact/compat
  • Loading branch information
SaiMaheshwarReddy committed Jul 8, 2023
1 parent 4b50543 commit aea6b3c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config/babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit aea6b3c

Please sign in to comment.