Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions e2e/scripts/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { platform } from 'node:os';
import { join } from 'node:path';
import { stripVTControlCharacters as stripAnsi } from 'node:util';
import { expect, test } from '@playwright/test';
import type { ConsoleType, LogLevel } from '@rsbuild/core';
import type { ConsoleType } from '@rsbuild/core';
import glob, {
convertPathToPattern,
type Options as GlobOptions,
Expand Down Expand Up @@ -77,7 +77,6 @@ export const expectFile = (dir: string) =>
export type ProxyConsoleOptions = {
types?: ConsoleType | ConsoleType[];
keepAnsi?: boolean;
logLevel?: LogLevel | 'verbose';
};

export type ProxyConsoleResult = {
Expand Down
21 changes: 0 additions & 21 deletions e2e/scripts/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,27 +201,6 @@ export async function dev({

const rsbuild = await createRsbuild(options, plugins);

rsbuild.addPlugins([
{
// fix HMR problem temporary (only appears in rsbuild repo, because css-loader is not in node_modules/ )
// https://github.com/web-infra-dev/rspack/issues/5723
name: 'fix-react-refresh-in-rsbuild',
setup(api) {
api.modifyBundlerChain({
order: 'post',
handler: (chain, { CHAIN_ID }) => {
if (chain.plugins.has(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH)) {
chain.plugin(CHAIN_ID.PLUGIN.REACT_FAST_REFRESH).tap((config) => {
config[0].exclude = [/node_modules/, /css-loader/];
return config;
});
}
},
});
},
},
]);

const wait = waitFirstCompileDone
? new Promise<void>((resolve) => {
rsbuild.onDevCompileDone(({ isFirstCompile }) => {
Expand Down
Loading