Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

Commit 5bccc3c

Browse files
committed
Update runtime plugin name
1 parent 8de03a3 commit 5bccc3c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
This is the first alpha version of the official plugin for using [SWC](https://swc.rs/) with React in Vite!
66

7-
Some breaking changes have been made to make the plugin closer to the Babel one while keeping the smallest API surface possible to reduce bugs, encourage future-proof compilation output and allow easier opt-in into future perf improvements (caching, move to other native toolchain, ...).
7+
Some breaking changes have been made to make the plugin closer to the Babel one while keeping the smallest API surface possible to reduce bugs, encourage future-proof compilation output and allow easier opt-in into future perf improvements (caching, move to other native toolchain, ...):
88

9-
- Automatically enable automatic JSX runtime. "Classic" runtime is not supported.
9+
- Automatically enable automatic JSX runtime. "classic" runtime is not supported
1010
- Skip transformation for `.js` files
1111
- Enforce [useDefineForClassFields](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#the-usedefineforclassfields-flag-and-the-declare-property-modifier)
12-
- Don't pass `esbuild.define` config option to SWC. You can use the [top level define option](https://vitejs.dev/config/shared-options.html#define) instead.
12+
- Don't pass `esbuild.define` config option to SWC. You can use the [top level define option](https://vitejs.dev/config/shared-options.html#define) instead
1313
- Use default export
1414

1515
To migrate, change your config to:
@@ -23,8 +23,7 @@ export default defineConfig({
2323
});
2424
```
2525

26-
This new release also include a runtime check for React refresh boundaries. When the conditions are not met (most of the time, exporting React components alongside functions or constant), the module is invalidated with a warning message to help you catch issues while
27-
keeping you page up-to date with code changes.
26+
This new release also include a runtime check for React refresh boundaries. When the conditions are not met (most of the time, exporting React components alongside functions or constant), the module is invalidated with a warning message to help you catch issues while keeping you page up-to date with code changes.
2827

2928
## 2.2.1
3029

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const _dirname =
1919

2020
const react = (): PluginOption[] => [
2121
{
22-
name: "swc-react-refresh",
22+
name: "@vitejs/plugin-react-swc",
2323
apply: "serve",
2424
config: () => ({
2525
esbuild: false,
@@ -108,7 +108,7 @@ const react = (): PluginOption[] => [
108108
},
109109
},
110110
{
111-
name: "swc-react-refresh",
111+
name: "@vitejs/plugin-react-swc",
112112
apply: "build",
113113
config: () => ({
114114
esbuild: {

0 commit comments

Comments
 (0)