diff --git a/packages/compat/webpack/rslib.config.ts b/packages/compat/webpack/rslib.config.ts index e7ad4588b0..803322ea29 100644 --- a/packages/compat/webpack/rslib.config.ts +++ b/packages/compat/webpack/rslib.config.ts @@ -3,19 +3,9 @@ import { dualPackage, esmConfig, } from '@rsbuild/config/rslib.config.ts'; -import { mergeRsbuildConfig } from '@rsbuild/core'; import { defineConfig } from '@rslib/core'; export default defineConfig({ ...dualPackage, - lib: [ - esmConfig, - mergeRsbuildConfig(cjsConfig, { - footer: { - // TODO https://github.com/web-infra-dev/rslib/issues/351 - js: `// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { webpackProvider: exports.webpackProvider });`, - }, - }), - ], + lib: [esmConfig, cjsConfig], }); diff --git a/packages/core/rslib.config.ts b/packages/core/rslib.config.ts index 51397ff543..5a6a75e87c 100644 --- a/packages/core/rslib.config.ts +++ b/packages/core/rslib.config.ts @@ -116,23 +116,6 @@ export default defineConfig({ output: { minify: nodeMinifyConfig, }, - footer: { - // TODO https://github.com/web-infra-dev/rslib/issues/351 - js: `// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - PLUGIN_CSS_NAME, - PLUGIN_SWC_NAME, - createRsbuild, - defineConfig, - ensureAssetPrefix, - loadConfig, - loadEnv, - logger, - mergeRsbuildConfig, - rspack, - version -});`, - }, }, { id: 'esm:client',