From 5609239f67719f9ec1c5daef5fa5b44acb08f677 Mon Sep 17 00:00:00 2001 From: easy1090 Date: Fri, 24 Jan 2025 17:04:23 +0800 Subject: [PATCH] fix: banner plugin switch condition --- e2e/cases/doctor-rspack/banner-plugin.test.ts | 6 +++--- e2e/cases/doctor-rspack/tag-plugin-without-banner.test.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/cases/doctor-rspack/banner-plugin.test.ts b/e2e/cases/doctor-rspack/banner-plugin.test.ts index dc77733d..1f8460d8 100644 --- a/e2e/cases/doctor-rspack/banner-plugin.test.ts +++ b/e2e/cases/doctor-rspack/banner-plugin.test.ts @@ -1,10 +1,10 @@ import { expect, test } from '@playwright/test'; +import { Utils } from '@rsdoctor/core/build-utils'; import { getSDK, setSDK } from '@rsdoctor/core/plugins'; -import { compileByRspack } from '@scripts/test-helper'; import { BannerPlugin, Compiler } from '@rspack/core'; +import { compileByRspack } from '@scripts/test-helper'; import path from 'path'; import { createRsdoctorPlugin } from './test-utils'; -import { parseBundle } from '../../node_modules/@rsdoctor/core/dist/build-utils/build/utils/parseBundle'; let reportLoaderStartOrEndTimes = 0; @@ -118,7 +118,7 @@ test('rspack banner plugin', async () => { const sdk = getSDK(); // @ts-ignore - const bundle = parseBundle( + const bundle = Utils.parseBundle( path.join(__dirname, './fixtures/rspack-banner-plugin.js'), // @ts-ignore sdk.getStoreData().moduleGraph.modules, diff --git a/e2e/cases/doctor-rspack/tag-plugin-without-banner.test.ts b/e2e/cases/doctor-rspack/tag-plugin-without-banner.test.ts index 90313a51..86e7e067 100644 --- a/e2e/cases/doctor-rspack/tag-plugin-without-banner.test.ts +++ b/e2e/cases/doctor-rspack/tag-plugin-without-banner.test.ts @@ -1,10 +1,10 @@ import { expect, test } from '@playwright/test'; import { getSDK, setSDK } from '@rsdoctor/core/plugins'; import { compileByRspack } from '@scripts/test-helper'; +import { Utils } from '@rsdoctor/core/build-utils'; import { Compiler } from '@rspack/core'; import path from 'path'; import { createRsdoctorPlugin } from './test-utils'; -import { parseBundle } from '../../node_modules/@rsdoctor/core/dist/build-utils/build/utils/parseBundle'; let reportLoaderStartOrEndTimes = 0; @@ -108,7 +108,7 @@ test('rspack banner plugin', async () => { const sdk = getSDK(); // @ts-ignore - const bundle = parseBundle( + const bundle = Utils.parseBundle( path.join(__dirname, './fixtures/rspack-banner-plugin.js'), // @ts-ignore sdk.getStoreData().moduleGraph.modules,