@vitejs/plugin-react-swc 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -80,7 +80,7 @@ const silenceUseClientWarning = (userConfig) => ({ rollupOptions: { onwarn(warni
|
|
|
80
80
|
//#region src/index.ts
|
|
81
81
|
const resolve = createRequire(import.meta.url).resolve;
|
|
82
82
|
const react = (_options) => {
|
|
83
|
-
let hmrDisabled =
|
|
83
|
+
let hmrDisabled = true;
|
|
84
84
|
let viteCacheRoot;
|
|
85
85
|
const options = {
|
|
86
86
|
jsxImportSource: _options?.jsxImportSource ?? "react",
|
|
@@ -119,7 +119,7 @@ const react = (_options) => {
|
|
|
119
119
|
}),
|
|
120
120
|
configResolved(config) {
|
|
121
121
|
viteCacheRoot = config.cacheDir;
|
|
122
|
-
|
|
122
|
+
hmrDisabled = config.server.hmr === false;
|
|
123
123
|
const mdxIndex = config.plugins.findIndex((p) => p.name === "@mdx-js/rollup");
|
|
124
124
|
if (mdxIndex !== -1 && mdxIndex > config.plugins.findIndex((p) => p.name === "vite:react-swc")) throw new Error("[vite:react-swc] The MDX plugin should be placed before this plugin");
|
|
125
125
|
if ("rolldownVersion" in vite && !options.plugins && !options.useAtYourOwnRisk_mutateSwcOptions && !options.disableOxcRecommendation) config.logger.warn("[vite:react-swc] We recommend switching to `@vitejs/plugin-react` for improved performance as no swc plugins are used. More information at https://vite.dev/rolldown");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/plugin-react-swc",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arnaud Barré (https://github.com/ArnaudBarre)",
|
|
6
6
|
"description": "Speed up your Vite dev server with SWC",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc#readme",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
29
|
+
"@rolldown/pluginutils": "1.0.0-beta.46",
|
|
30
30
|
"@swc/core": "^1.13.5"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|