add react-refresh dependency to Meteor Rspack templates

This commit is contained in:
Nacho Codoñer
2025-08-26 15:34:07 +02:00
parent 47c19bdff9
commit 2a835bafda
7 changed files with 12 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ export const DEFAULT_METEOR_RSPACK_VERSION = '0.0.33';
export const DEFAULT_METEOR_RSPACK_REACT_HMR_VERSION = '1.4.3';
export const DEFAULT_METEOR_RSPACK_REACT_REFRESH_VERSION = '0.17.0';
export const DEFAULT_METEOR_RSPACK_SWC_LOADER_VERSION = '0.2.6';

View File

@@ -2,7 +2,7 @@
* @module dependencies
* @description Functions for managing dependencies for Rspack plugin
*/
import { DEFAULT_METEOR_RSPACK_SWC_HELPERS_VERSION } from "./constants";
import { DEFAULT_METEOR_RSPACK_REACT_REFRESH_VERSION, DEFAULT_METEOR_RSPACK_SWC_HELPERS_VERSION } from "./constants";
const {
getGlobalState,
@@ -167,7 +167,8 @@ export function checkReactInstalled() {
export async function ensureRspackReactInstalled() {
const dependencies = [
{ name: '@rspack/plugin-react-refresh', version: DEFAULT_METEOR_RSPACK_REACT_HMR_VERSION, semverCondition: 'gte', dev: true }
{ name: '@rspack/plugin-react-refresh', version: DEFAULT_METEOR_RSPACK_REACT_HMR_VERSION, semverCondition: 'gte', dev: true },
{ name: 'react-refresh', version: DEFAULT_METEOR_RSPACK_REACT_REFRESH_VERSION, semverCondition: 'gte', dev: true },
];
await ensureDependenciesInstalled(

View File

@@ -22,7 +22,8 @@
"@meteorjs/rspack": "^0.0.33",
"@rspack/cli": "^1.4.8",
"@rspack/core": "^1.4.8",
"@rspack/plugin-react-refresh": "^1.4.3"
"@rspack/plugin-react-refresh": "^1.4.3",
"react-refresh": "^0.17.0"
},
"meteor": {
"mainModule": {

View File

@@ -24,7 +24,8 @@
"@meteorjs/rspack": "^0.0.33",
"@rspack/cli": "^1.4.8",
"@rspack/core": "^1.4.8",
"@rspack/plugin-react-refresh": "^1.4.3"
"@rspack/plugin-react-refresh": "^1.4.3",
"react-refresh": "^0.17.0"
},
"meteor": {
"mainModule": {

View File

@@ -18,7 +18,8 @@
"@meteorjs/rspack": "^0.0.33",
"@rspack/cli": "^1.4.8",
"@rspack/core": "^1.4.8",
"@rspack/plugin-react-refresh": "^1.4.3"
"@rspack/plugin-react-refresh": "^1.4.3",
"react-refresh": "^0.17.0"
},
"meteor": {
"mainModule": {

View File

@@ -24,6 +24,7 @@
"@types/meteor": "^2.9.7",
"postcss": "^8.5.6",
"postcss-loader": "^8.1.1",
"react-refresh": "^0.17.0",
"tailwindcss": "^4.1.12"
},
"meteor": {

View File

@@ -24,6 +24,7 @@
"@types/node": "^22.10.6",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"react-refresh": "^0.17.0",
"ts-checker-rspack-plugin": "^1.1.5",
"typescript": "^5.4.5"
},