Skip to content

Commit

Permalink
fix(rspack): ensure react-refresh is installed (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 authored Mar 8, 2024
1 parent 6317abe commit 3b457e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/rspack/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
} from '@nx/devkit';
import { initGenerator } from '@nx/js';
import {
lessLoaderVersion,
lessLoaderVersion, reactRefreshVersion,
rspackCoreVersion,
rspackDevServerVersion,
rspackPluginMinifyVersion,
rspackPluginReactRefreshVersion,
rspackPluginReactRefreshVersion
} from '../../utils/versions';
import { InitGeneratorSchema } from './schema';

Expand All @@ -32,6 +32,7 @@ export async function rspackInitGenerator(
'@rspack/core': rspackCoreVersion,
'@rspack/plugin-minify': rspackPluginMinifyVersion,
'@rspack/plugin-react-refresh': rspackPluginReactRefreshVersion,
'react-refresh': reactRefreshVersion
};

// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down
1 change: 1 addition & 0 deletions packages/rspack/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const rspackPluginReactRefreshVersion = '~0.5.6';
export const lessLoaderVersion = '~11.1.3';

export const reactVersion = '~18.2.0';
export const reactRefreshVersion = '~0.14.0';
export const reactDomVersion = '~18.2.0';
export const typesReactVersion = '~18.0.28';
export const typesReactDomVersion = '~18.0.10';
Expand Down

0 comments on commit 3b457e2

Please sign in to comment.