Skip to content

Commit

Permalink
fix: align jsx runtime for optimized dependencies (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre authored Nov 16, 2023
1 parent 17bb3ab commit 3b6967f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
labels: ["dependencies"],
rangeStrategy: "bump",
packageRules: [{ depTypeList: ["peerDependencies"], enabled: false }],
ignoreDeps: ["generouted"]
ignoreDeps: [
"generouted", // testing lib shipping JSX (new version ship transpiled JS)
"prettier", // waiting for stable choice on ternaries
],
}
6 changes: 6 additions & 0 deletions 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.

## 3.4.1

### Add support for `.mts` (fixes [#161](/~https://github.com/vitejs/vite-plugin-react-swc/issues/161))
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const react = (_options?: Options): PluginOption[] => {
esbuild: false,
optimizeDeps: {
include: [`${options.jsxImportSource}/jsx-dev-runtime`],
esbuildOptions: { jsx: "automatic" },
},
}),
configResolved(config) {
Expand Down

0 comments on commit 3b6967f

Please sign in to comment.