From 91a0edd994d4db73d11e3da8206f96741e119daa Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 21 Dec 2024 20:49:47 +0800 Subject: [PATCH] Revert "chore: prepare for v1.2.0 release (#4207)" (#4234) --- packages/core/rslib.config.ts | 1 + packages/core/src/index.ts | 9 +++++++++ packages/core/src/rspack/RsbuildHtmlPlugin.ts | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/core/rslib.config.ts b/packages/core/rslib.config.ts index c0e3b9c9b6..a5db8a8a8d 100644 --- a/packages/core/rslib.config.ts +++ b/packages/core/rslib.config.ts @@ -138,6 +138,7 @@ export default defineConfig({ 0 && (module.exports = { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, + __internalHelper, createRsbuild, defineConfig, ensureAssetPrefix, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 950b9e2aed..8ecf0f11a8 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -4,6 +4,7 @@ */ import { rspack } from '@rspack/core'; import type * as Rspack from '@rspack/core'; +import * as __internalHelper from './internal'; // Core methods export { loadEnv } from './loadEnv'; @@ -163,3 +164,11 @@ export type { WatchFiles, } from './types'; export type { ChainIdentifier } from './configChain'; + +export { + /** + * @private + * TODO: remove this in Rspack v1.2.0 + */ + __internalHelper, +}; diff --git a/packages/core/src/rspack/RsbuildHtmlPlugin.ts b/packages/core/src/rspack/RsbuildHtmlPlugin.ts index c8bab800e4..ba00a201ed 100644 --- a/packages/core/src/rspack/RsbuildHtmlPlugin.ts +++ b/packages/core/src/rspack/RsbuildHtmlPlugin.ts @@ -310,7 +310,8 @@ export class RsbuildHtmlPlugin { compiler.hooks.compilation.tap(this.name, (compilation: Compilation) => { getHTMLPlugin() - .getCompilationHooks(compilation) + // TODO: use getCompilationHooks in minor release + .getHooks(compilation) .alterAssetTagGroups.tapPromise(this.name, async (data) => { const entryName = data.plugin.options?.entryName;