Overview
Inside of astro.config.mjs, integrations: [preact({ compat: true })] was added to support running React code into our Preact code which we wanted so we can import React libraries like useSWR for data fetching.
But doing that changed how Astro bundles our preact/compat library. The expected hooks are not available as exports anymore so it breaks the import maps that JS components rely on.
Proposed resolution
- TBD but something along the lines of fix the importmaps to point to libraries with un-minified exports or see if there is some Astro configuration that can be added to fix this
User interface changes
Issue fork experience_builder-3530837
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3530837-react-external
changes, plain diff MR !1161
- 3530837-import-map-used
changes, plain diff MR !1160
Comments
Comment #2
hooroomooComment #3
hooroomooComment #4
hooroomooComment #8
hooroomooComment #10
hooroomooComment #11
hooroomooComment #12
hooroomooComment #14
hooroomoo