Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react): a workaround for missing named exports #573

Merged
merged 2 commits into from
Oct 15, 2022

Conversation

dai-shi
Copy link
Member

@dai-shi dai-shi commented Oct 15, 2022

close #572

@vercel
Copy link

vercel bot commented Oct 15, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
valtio ✅ Ready (Inspect) Visit Preview Oct 15, 2022 at 2:40AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 15, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e709fe0:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
React Parcel Configuration

@github-actions
Copy link

github-actions bot commented Oct 15, 2022

Size Change: +45 B (0%)

Total Size: 51 kB

Filename Size Change
dist/esm/index.js 997 B +11 B (+1%)
dist/index.js 1.02 kB +11 B (+1%)
dist/system/index.development.js 1.17 kB +5 B (0%)
dist/system/index.production.js 530 B +4 B (+1%)
dist/umd/index.development.js 1.15 kB +12 B (+1%)
dist/umd/index.production.js 636 B +2 B (0%)
ℹ️ View Unchanged
Filename Size
dist/esm/macro.js 617 B
dist/esm/macro/vite.js 732 B
dist/esm/utils.js 4.14 kB
dist/esm/vanilla.js 2.02 kB
dist/macro.js 896 B
dist/macro/vite.js 1.03 kB
dist/system/macro.development.js 725 B
dist/system/macro.production.js 555 B
dist/system/macro/vite.development.js 839 B
dist/system/macro/vite.production.js 660 B
dist/system/utils.development.js 4.35 kB
dist/system/utils.production.js 2.92 kB
dist/system/vanilla.development.js 2.16 kB
dist/system/vanilla.production.js 1.35 kB
dist/umd/macro.development.js 1.05 kB
dist/umd/macro.production.js 757 B
dist/umd/macro/vite.development.js 1.2 kB
dist/umd/macro/vite.production.js 882 B
dist/umd/utils.development.js 4.81 kB
dist/umd/utils.production.js 3.07 kB
dist/umd/vanilla.development.js 2.35 kB
dist/umd/vanilla.production.js 1.47 kB
dist/utils.js 4.66 kB
dist/vanilla.js 2.23 kB

compressed-size-action

@nornagon
Copy link

FWIW, this seems to cause issues when substituting preact/hooks for react, as preact/hooks has no default export:

The requested module 'preact/hooks' does not provide an export named 'default'

@dai-shi
Copy link
Member Author

dai-shi commented May 25, 2023

That's really unsolvable from the library perspective. We hope React provides ESM, and meanwhile Preact provides CJS with default everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Next.js app fails to compile due to strict named exports (missing experimental_use)
2 participants