-
Notifications
You must be signed in to change notification settings - Fork 84
Fix loader breaking automatic JSX transform for files without workflow directives #255
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
base: main
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Co-authored-by: pranaygp <1797812+pranaygp@users.noreply.github.com>
Files without
"use workflow"or"use step"directives were failing SSR withReferenceError: React is not defined. The loader was preventing Next.js from applying automatic JSX runtime transforms.Changes
packages/next/src/loader.tscallback(null, source, sourceMap)→ allows Next.js SWC to process filereturn normalizedSource→ blocked subsequent loaderspackages/next/src/index.ts*.tsx/*.tsrules replaced default transforms, breaking files without directivesWhy
In webpack, returning source from a loader marks the file as processed, skipping remaining loaders. In Turbopack, defining custom rules for file extensions replaces default handling entirely. Both prevented Next.js's automatic JSX transform (
react/jsx-runtime) from running.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/usr/local/bin/node /home/REDACTED/work/workflow/workflow/node_modules/.pnpm/next@15.5.4_@opentelemetry+api@1.9.0_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/next/dist/compiled/jest-worker/processChild.js(dns block)node /home/REDACTED/work/workflow/workflow/workbench/nextjs-turbopack/node_modules/.bin/../next/dist/bin/next build --turbopack(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.