Skip to content

Commit

Permalink
fix: align jsx runtime for optimized dependencies (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Nov 16, 2023
1 parent f10a577 commit 96b66ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
// breaking changes
"source-map", // `source-map:v0.7.0+` needs more investigation
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)

"prettier", // waiting for stable choice on ternaries
],
}
6 changes: 6 additions & 0 deletions packages/plugin-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

### Align jsx runtime for optimized dependencies

This will only affect people using internal libraries that contains untranspiled JSX. This change aligns the optimizer with the source code and avoid issues when the published source don't have `React` in the scope.

Reminder: While being partially supported in Vite, publishing TS & JSX outside of internal libraries is highly discouraged.

## 4.1.1 (2023-11-02)

- Enable retainLines to get correct line numbers for jsxDev (fix [#235](https://github.com/vitejs/vite-plugin-react/issues/235))
Expand Down
1 change: 1 addition & 0 deletions packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
jsx: 'automatic',
jsxImportSource: opts.jsxImportSource,
},
optimizeDeps: { esbuildOptions: { jsx: 'automatic' } },
}
}
},
Expand Down

0 comments on commit 96b66ed

Please sign in to comment.