From 0b3271d2751a78f8a16faf22767da658b8569ec9 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 6 Sep 2021 00:00:07 +0200 Subject: [PATCH] fix(bridge): set webpack as implicit external --- packages/bridge/build.config.ts | 3 +++ packages/bridge/src/async-loading.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 {