From 62a11d0c6a09b6d56d8436ad4309f60bc8d2a4c4 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 --- build.config.ts | 3 +++ src/async-loading.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.config.ts b/build.config.ts index 164e9402..83890208 100644 --- a/build.config.ts +++ b/build.config.ts @@ -3,5 +3,8 @@ import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/module' + ], + externals: [ + 'webpack' ] }) diff --git a/src/async-loading.ts b/src/async-loading.ts index a672c401..a6ef9b2a 100644 --- a/src/async-loading.ts +++ b/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 {