diff --git a/packages/bridge/build.config.ts b/packages/bridge/build.config.ts index 164e940259..83890208ac 100644 --- a/packages/bridge/build.config.ts +++ b/packages/bridge/build.config.ts @@ -3,5 +3,8 @@ import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/module' + ], + externals: [ + 'webpack' ] }) diff --git a/packages/bridge/src/async-loading.ts b/packages/bridge/src/async-loading.ts index a672c401fa..a6ef9b2ab6 100644 --- a/packages/bridge/src/async-loading.ts +++ b/packages/bridge/src/async-loading.ts @@ -1,6 +1,6 @@ // Based on https://github.com/webpack/webpack/blob/v4.46.0/lib/node/NodeMainTemplatePlugin.js#L81-L191 -import { Compiler } from 'webpack' +import type { Compiler } from 'webpack' import Template from 'webpack/lib/Template' export class AsyncLoadingPlugin {