fix the build system.

Emotion changed to use exports map, and esbuild wasn't pivking the right entry anymore,
resulting in react not being detected, and thus not bundled, and thus missing at runtime!

I changed the tsup/esbuild config to prefer the ESM version, and this seems to have fixed the issue.

Many thanks to @Anderist for the assist!
This commit is contained in:
Norbert de Langen 2022-08-26 14:30:07 +02:00
parent a78c62a7e8
commit 6ebde54236
No known key found for this signature in database
GPG Key ID: FD0E78AF9A837762

View File

@ -80,6 +80,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
: false,
esbuildOptions: (c) => {
/* eslint-disable no-param-reassign */
c.conditions = ['module'];
c.define = optimized
? {
'process.env.NODE_ENV': "'production'",