From 2c964b79ea7c566cc931cea4c0750473fe6f49f5 Mon Sep 17 00:00:00 2001 From: JW Date: Thu, 23 Mar 2023 21:44:13 +0800 Subject: [PATCH] :green_heart: bundle imported packages into background bundle (#14) --- .changeset/odd-lizards-appear.md | 5 +++++ tsup.config.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/odd-lizards-appear.md diff --git a/.changeset/odd-lizards-appear.md b/.changeset/odd-lizards-appear.md new file mode 100644 index 0000000..05128a9 --- /dev/null +++ b/.changeset/odd-lizards-appear.md @@ -0,0 +1,5 @@ +--- +"@aiou/webext-template": patch +--- + +bundle all packages into background bundle diff --git a/tsup.config.ts b/tsup.config.ts index 73251de..77cc52e 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -7,6 +7,8 @@ export default defineConfig(() => ({ ...(isDev ? { mv3client: './scripts/client.ts' } : {}), }, outDir: 'extension/dist', + // bundle all imported packages into bundle(background.ts) + noExternal: [/./], format: ['esm'], target: 'esnext', ignoreWatch: ['**/extension/**'],