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

[compiler] Consume compiled lib in react 18 app #31166

Merged
merged 2 commits into from
Oct 10, 2024
Merged

[compiler] Consume compiled lib in react 18 app #31166

merged 2 commits into from
Oct 10, 2024

Conversation

poteto
Copy link
Member

@poteto poteto commented Oct 10, 2024

yarn dev doesn't work quite correctly because of an outdated assumption in vite-plugin-react, I have a PR open to address.

However yarn build and yarn preview does work as expected.

Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

vercel bot commented Oct 10, 2024

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

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 10, 2024 3:39pm

@poteto
Copy link
Member Author

poteto commented Oct 10, 2024

Screenshot 2024-10-09 at 8 24 40 PM

@react-sizebot
Copy link

react-sizebot commented Oct 10, 2024

Comparing: de43d56...db62a06

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 507.80 kB 507.80 kB = 90.79 kB 90.79 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 512.74 kB 512.74 kB = 91.51 kB 91.51 kB
facebook-www/ReactDOM-prod.classic.js = 603.01 kB 603.01 kB = 106.64 kB 106.64 kB
facebook-www/ReactDOM-prod.modern.js = 579.21 kB 579.21 kB = 102.72 kB 102.72 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 952e7d0

@@ -11,13 +11,16 @@
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-compiler-runtime": "0.0.0-experimental-8d8e73f-20241009",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only required for the app code, not to make the library work, right? Since the library has its own dependency on the compiler runtime.

Copy link
Member Author

Choose a reason for hiding this comment

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

yup exactly

poteto added a commit that referenced this pull request Oct 10, 2024
Add missing directory to prettierignore.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31168).
* #31167
* #31166
* #31165
* #31164
* #31148
* __->__ #31168
poteto added a commit that referenced this pull request Oct 10, 2024
Scaffolds an empty library to test backwards compatibility with the
compiler enabled.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31148).
* #31167
* #31166
* #31165
* #31164
* __->__ #31148
* #31168
poteto added a commit that referenced this pull request Oct 10, 2024
Scaffold empty apps to consume the fixture lib.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31164).
* #31167
* #31166
* #31165
* __->__ #31164
* #31148
* #31168
Add and compile a simple hook with rollup and babel.
`yarn dev` doesn't work quite correctly because of an outdated assumption in vite-plugin-react, I have a [PR open](vitejs/vite-plugin-react#374) to address.

However `yarn build` and `yarn preview` does work as expected.
poteto added a commit that referenced this pull request Oct 10, 2024
Add and compile a simple hook with rollup and babel.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31165).
* #31167
* #31166
* __->__ #31165
@poteto poteto merged commit 0a1fdee into main Oct 10, 2024
33 checks passed
@poteto poteto deleted the pr31166 branch October 10, 2024 15:39
poteto added a commit that referenced this pull request Oct 10, 2024
it works
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/31167).
* __->__ #31167
* #31166
* #31165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants