Skip to content

Commit f917e3c

Browse files
authored
chore: resolve some type and test related TODO (#2124)
1 parent 7ed5d1d commit f917e3c

File tree

9 files changed

+42
-107
lines changed

9 files changed

+42
-107
lines changed

e2e/cases/react/remove-prop-types/index.test.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

e2e/cases/react/remove-prop-types/package.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

e2e/cases/react/remove-prop-types/src/App.jsx

Lines changed: 0 additions & 17 deletions
This file was deleted.

e2e/cases/react/remove-prop-types/src/index.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

e2e/cases/swc-plugin/index.test.ts

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
1-
import { expect, test } from '@playwright/test';
2-
import { dev, build, gotoPage } from '@e2e/helper';
3-
4-
// TODO: https://github.com/web-infra-dev/rspack/issues/5921
5-
test.skip('should run swc warm plugin correctly in dev mode', async ({
6-
page,
7-
}) => {
8-
const rsbuild = await dev({
9-
cwd: __dirname,
10-
});
11-
12-
const msgPromise = page.waitForEvent('console');
13-
await gotoPage(page, rsbuild);
14-
15-
const msg = await msgPromise;
16-
expect(await msg.args()[0].jsonValue()).toEqual('this is error');
17-
18-
await rsbuild.close();
19-
});
20-
21-
test.skip('should run swc warm plugin correctly in production build', async ({
22-
page,
23-
}) => {
24-
const rsbuild = await build({
25-
cwd: __dirname,
26-
runServer: true,
27-
});
28-
29-
const msgPromise = page.waitForEvent('console');
30-
await gotoPage(page, rsbuild);
31-
32-
const msg = await msgPromise;
33-
expect(await msg.args()[0].jsonValue()).toEqual('this is error');
34-
35-
await rsbuild.close();
36-
});
1+
import { expect } from '@playwright/test';
2+
import { dev, build, gotoPage, rspackOnlyTest } from '@e2e/helper';
3+
4+
rspackOnlyTest(
5+
'should run SWC Wasm plugin correctly in dev mode',
6+
async ({ page }) => {
7+
const rsbuild = await dev({
8+
cwd: __dirname,
9+
});
10+
11+
const msgPromise = page.waitForEvent('console');
12+
await gotoPage(page, rsbuild);
13+
14+
const msg = await msgPromise;
15+
expect(await msg.args()[0].jsonValue()).toEqual('this is error');
16+
17+
await rsbuild.close();
18+
},
19+
);
20+
21+
rspackOnlyTest(
22+
'should run SWC Wasm plugin correctly in production build',
23+
async ({ page }) => {
24+
const rsbuild = await build({
25+
cwd: __dirname,
26+
runServer: true,
27+
});
28+
29+
const msgPromise = page.waitForEvent('console');
30+
await gotoPage(page, rsbuild);
31+
32+
const msg = await msgPromise;
33+
expect(await msg.args()[0].jsonValue()).toEqual('this is error');
34+
35+
await rsbuild.close();
36+
},
37+
);

e2e/cases/swc-plugin/rsbuild.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
experimental: {
88
plugins: [
99
[
10-
'@swc/plugin-remove-console',
10+
require.resolve('@swc/plugin-remove-console'),
1111
{
1212
exclude: ['error'],
1313
},

packages/core/src/plugins/html.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,7 @@ function getChunks(
164164
entryValue: string | string[] | EntryDescription,
165165
): string[] {
166166
if (isPlainObject(entryValue)) {
167-
const { dependOn } = entryValue as EntryDescription & {
168-
// TODO: remove this after bumping Rspack v0.6
169-
// https://github.com/web-infra-dev/rspack/pull/6069
170-
dependOn?: string | string[] | undefined;
171-
};
167+
const { dependOn } = entryValue as EntryDescription;
172168
if (Array.isArray(dependOn)) {
173169
return [...dependOn, entryName];
174170
}

pnpm-lock.yaml

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ flexbox
3030
flexbugs
3131
fnames
3232
fullhash
33+
gzipped
3334
icss
3435
idents
3536
iife

0 commit comments

Comments
 (0)