Skip to content

feat(react-transform): Suppport require syntax in our babel transform #584

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

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Jul 12, 2024

Noticed we threw an error for non-ESM modules, so added support for that as we are exporting a CJS build of our react-bindings either way.

CC @andrewiggins not sure if you opted out here for a reason

Fixes #575

Copy link

changeset-bot bot commented Jul 12, 2024

🦋 Changeset detected

Latest commit: a28dc05

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@preact/signals-react-transform Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Jul 12, 2024

Deploy Preview for preact-signals-demo ready!

Name Link
🔨 Latest commit a28dc05
🔍 Latest deploy log https://app.netlify.com/sites/preact-signals-demo/deploys/66911a07360fa40008b40a0d
😎 Deploy Preview https://deploy-preview-584--preact-signals-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

github-actions bot commented Jul 12, 2024

Size Change: +348 B (+0.43%)

Total Size: 81.4 kB

Filename Size Change
packages/react-transform/dist/signals-*********.js 5.03 kB +122 B (+2.49%)
packages/react-transform/dist/signals-transform.mjs 4.27 kB +103 B (+2.47%)
packages/react-transform/dist/signals-transform.umd.js 5.15 kB +123 B (+2.45%)
ℹ️ View Unchanged
Filename Size
docs/dist/assets/client.********.js 46.3 kB
docs/dist/assets/index.********.js 838 B
docs/dist/assets/jsxRuntime.module.********.js 284 B
docs/dist/assets/preact.module.********.js 4.03 kB
docs/dist/assets/signals-core.module.********.js 1.4 kB
docs/dist/assets/signals.module.********.js 2.02 kB
docs/dist/assets/style.********.js 21 B
docs/dist/assets/style.********.css 1.21 kB
docs/dist/basic-********.js 244 B
docs/dist/demos-********.js 3.41 kB
docs/dist/nesting-********.js 1.13 kB
docs/dist/react-********.js 242 B
packages/core/dist/signals-core.js 1.45 kB
packages/core/dist/signals-core.mjs 1.47 kB
packages/preact/dist/signals.js 1.27 kB
packages/preact/dist/signals.mjs 1.22 kB
packages/react/dist/signals.js 188 B
packages/react/dist/signals.mjs 150 B

compressed-size-action

@marvinhagemeister
Copy link
Member

LGTM, but a test case would be nice

@JoviDeCroock
Copy link
Member Author

@marvinhagemeister good shout, was still figuring out how to trick the isModule helper 😅

Copy link
Member

@rschristian rschristian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than the thing I mentioned in Slack.

I imagine this doesn't need any altered instructions for the end user then? They can add the Babel plugin in the same way and all will work?

@alxrodav
Copy link

Any progress with this PR? I started a new React Native App, and would love to give it a try to signals

@JoviDeCroock JoviDeCroock merged commit 726e417 into main Jul 23, 2024
6 checks passed
@JoviDeCroock JoviDeCroock deleted the support-require branch July 23, 2024 07:18
@github-actions github-actions bot mentioned this pull request Jul 23, 2024
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.

@preact/signals-react-transform not working in React Native
4 participants