Skip to content

feat: enable JSX automatic runtime in webpack esbuild-loader and vitest - #894

Merged
jordan-a-young merged 1 commit into
masterfrom
feature/jsx-automatic-runtime
Sep 16, 2026
Merged

jordan-a-young merged 1 commit into
masterfrom
feature/jsx-automatic-runtime

Conversation

@jordan-a-young

Copy link
Copy Markdown
Member
  • Add jsxRuntime: 'automatic' to esbuild-loader options in webpack.config.js
  • Add esbuild: { jsx: 'automatic', jsxImportSource: 'react' } to vitest.config.js
  • Update snapshot to reflect new esbuild-loader option

This allows .jsx files to omit 'import React from react' since the automatic JSX runtime injects the necessary imports. Aligns webpack behavior with the Vite starter which already uses automatic runtime via @vitejs/plugin-react.

- Add jsxRuntime: 'automatic' to esbuild-loader options in webpack.config.js
- Add esbuild: { jsx: 'automatic', jsxImportSource: 'react' } to vitest.config.js
- Update snapshot to reflect new esbuild-loader option

This allows .jsx files to omit 'import React from react' since the
automatic JSX runtime injects the necessary imports. Aligns webpack
behavior with the Vite starter which already uses automatic runtime
via @vitejs/plugin-react.
@jordan-a-young
jordan-a-young merged commit a2877f6 into master Sep 16, 2026
5 checks passed
@jordan-a-young
jordan-a-young deleted the feature/jsx-automatic-runtime branch September 16, 2026 13:24
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.

1 participant