Skip to content

Conversation

@stipsan
Copy link
Contributor

@stipsan stipsan commented Jan 6, 2025

Summary

The move to esbuild in #31963 is causing build errors in many of our systems due to the changed output format:

perf-studio:build: /vercel/path1/node_modules/.pnpm/[email protected][email protected]/node_modules/react-compiler-runtime/dist/index.js:17
perf-studio:build: import * as React from "react";
perf-studio:build: ^^^^^^
perf-studio:build: SyntaxError: Cannot use import statement outside a module
perf-studio:build:     at extensions..js (~/path1/node_modules/.pnpm/[email protected][email protected]/node_modules/esbuild-register/dist/node.js:4833:24)

esbuild-register and jest are repeat offenders.

How did you test this change?

The new output with this change is cjs, which is what it used to be and matches what react itself is currently published as.

@vercel
Copy link

vercel bot commented Jan 6, 2025

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 Jan 6, 2025 10:43am

@poteto poteto merged commit 9627d71 into facebook:main Jan 6, 2025
18 checks passed
poteto added a commit that referenced this pull request Jan 16, 2025
Alternative to #32071. As a follow up to #31993, the `platform` target was incorrectly being set to `browser` since it was the default argument for the build script. This corrects it to `node` and `cjs` which I think should resolve node 20 issues.
poteto added a commit that referenced this pull request Jan 16, 2025
Alternative to #32071. As a follow up to #31993, the `platform` target
was incorrectly being set to `browser` since it was the default argument
for the build script. This corrects it to `node` and `cjs` which I think
should resolve node 20 issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants