镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(react): respect environment sourcemap option when builder.sharedPlugins is enabled - #1439

Merged
sapphi-red merged 2 commits into
mainfrom
fix-react---respect-environment-sourcemap-option-when--builder-sharedplugins--is-enabled
Aug 28, 2026
Merged

sapphi-red merged 2 commits into
mainfrom
fix-react---respect-environment-sourcemap-option-when--builder-sharedplugins--is-enabled

Conversation

@sapphi-red

Copy link
Copy Markdown
Member

Description

fixes #1434
close #1435

@sapphi-red
sapphi-red merged commit 82d35ab into main Aug 28, 2026
13 checks passed
@sapphi-red
sapphi-red deleted the fix-react---respect-environment-sourcemap-option-when--builder-sharedplugins--is-enabled branch August 28, 2026 03:18
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 29, 2026
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 6.0.2 | 6.1.1 |


## [v6.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#611-2026-08-28)

##### Add `compiler.logDiagnostics` option

Recoverable React Compiler diagnostics are no longer logged by default. Set `compiler.logDiagnostics` to `true` to log them through Vite. Fatal diagnostics are always logged and fail the transform.

##### Respect environment sourcemap option for React Compiler transform when `builder.sharedPlugins` is enabled ([#1439](vitejs/vite-plugin-react#1439))

The React Compiler transform was using the top-level sourcemap option instead of the environment sourcemap option. This caused a problem when the experimental `builder.sharedPlugins` was enabled.


## [v6.1.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#610-2026-08-19)

##### Add experimental native React Compiler support ([#1419](vitejs/vite-plugin-react#1419))

Add experimental native React Compiler support.

You can use it by installing `oxc-transform-react` and enabling it via the `compiler` option:

```sh
npm install -D oxc-transform-react
```

```js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [
     react({ compiler: true })
  ]
})
```


## [v6.0.5](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#605-2026-07-30)

##### Fixed the react compiler preset filter to be linear ([#1353](vitejs/vite-plugin-react#1353))

The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](vitejs/vite-plugin-react#1349)). The filter was changed to be linear to avoid that.


## [v6.0.4](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#604-2026-07-22)

##### Fixed `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production`

When running `vite dev` with `NODE_ENV=production`, the app errored with `$RefreshSig$ is not defined`.
This error is now fixed.


## [v6.0.3](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#603-2026-06-23)
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 29, 2026
| datasource | package              | from  | to    |
| ---------- | -------------------- | ----- | ----- |
| npm        | @vitejs/plugin-react | 6.0.2 | 6.1.1 |


## [v6.1.1](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#611-2026-08-28)

##### Add `compiler.logDiagnostics` option

Recoverable React Compiler diagnostics are no longer logged by default. Set `compiler.logDiagnostics` to `true` to log them through Vite. Fatal diagnostics are always logged and fail the transform.

##### Respect environment sourcemap option for React Compiler transform when `builder.sharedPlugins` is enabled ([#1439](vitejs/vite-plugin-react#1439))

The React Compiler transform was using the top-level sourcemap option instead of the environment sourcemap option. This caused a problem when the experimental `builder.sharedPlugins` was enabled.


## [v6.1.0](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#610-2026-08-19)

##### Add experimental native React Compiler support ([#1419](vitejs/vite-plugin-react#1419))

Add experimental native React Compiler support.

You can use it by installing `oxc-transform-react` and enabling it via the `compiler` option:

```sh
npm install -D oxc-transform-react
```

```js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [
     react({ compiler: true })
  ]
})
```


## [v6.0.5](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#605-2026-07-30)

##### Fixed the react compiler preset filter to be linear ([#1353](vitejs/vite-plugin-react#1353))

The improved filter in v6.0.3 was non-linear and caused a performance regression ([#1349](vitejs/vite-plugin-react#1349)). The filter was changed to be linear to avoid that.


## [v6.0.4](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#604-2026-07-22)

##### Fixed `$RefreshSig$ is not defined` error when running `vite dev` with `NODE_ENV=production`

When running `vite dev` with `NODE_ENV=production`, the app errored with `$RefreshSig$ is not defined`.
This error is now fixed.


## [v6.0.3](https://github.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#603-2026-06-23)
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.

react({ compiler: true }) captures build.sourcemap in a closure, so under builder.sharedPlugins the last environment's setting applies to every build

1 participant