Skip to content

Commit

Permalink
chore(rsbuild): add migration notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Dec 17, 2024
1 parent 57b22b2 commit 9fc8ab5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/react/src/react-rsbuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Build React applications and libraries with Rsbuild', () => {
);

await runCLIAsync(`build ${rsbuildApp}`);
checkFilesExist(`dist/apps/${rsbuildApp}/index.html`);
checkFilesExist(`apps/${rsbuildApp}/dist/index.html`);
}, 300_000);

it('should test and lint app with bundler=rsbuild', async () => {
Expand All @@ -57,7 +57,7 @@ describe('Build React applications and libraries with Rsbuild', () => {
);

await runCLIAsync(`build ${rsbuildApp}`);
checkFilesExist(`dist/apps/${rsbuildApp}/index.html`);
checkFilesExist(`apps/${rsbuildApp}/dist/index.html`);
}, 300_000);

it('should test and lint app with bundler=rsbuild and inSourceTests', async () => {
Expand All @@ -81,7 +81,7 @@ describe('Build React applications and libraries with Rsbuild', () => {
);

await runCLIAsync(`build ${rsbuildApp}`);
checkFilesExist(`dist/apps/${rsbuildApp}/index.html`);
checkFilesExist(`apps/${rsbuildApp}/dist/index.html`);
}, 300_000);

it('should support bundling with Rsbuild and Jest', async () => {
Expand All @@ -97,6 +97,6 @@ describe('Build React applications and libraries with Rsbuild', () => {
);

await runCLIAsync(`build ${rsbuildApp}`);
checkFilesExist(`dist/apps/${rsbuildApp}/index.html`);
checkFilesExist(`apps/${rsbuildApp}/dist/index.html`);
}, 300_000);
});
3 changes: 3 additions & 0 deletions packages/rsbuild/src/plugins/plugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ describe('@nx/rsbuild/plugin', () => {
},
"preview-serve": {
"command": "rsbuild preview",
"dependsOn": [
"^build-something",
],
"options": {
"args": [
"--mode=production",
Expand Down
8 changes: 8 additions & 0 deletions packages/rsbuild/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ export const rsbuildPluginReactVersion = '1.1.0';
export const rsbuildPluginSassVersion = '1.1.2';
export const rsbuildPluginLessVersion = '1.1.0';
export const rsbuildPluginStyledComponentsVersion = '1.1.0';

/**
* These versions need to line up with the version of the swc_core crate Rspack uses for the version of Rsbuild above
* Checking the `cargo.toml` at https://github.com/web-infra-dev/rspack/blob/main/Cargo.toml for the correct Rspack version
* is the best way to ensure that these versions are correct.
*
* The release notes for the packages below are very helpful in understanding what version of swc_core crate they require.
*/
export const rsbuildSwcPluginEmotionVersion = '^7.0.3';
export const rsbuildSwcPluginStyledJsxVersion = '^5.0.2';

0 comments on commit 9fc8ab5

Please sign in to comment.