From 420eebfd2085075fa7487ff99391ed12943eb712 Mon Sep 17 00:00:00 2001 From: Aaron Klinker Date: Mon, 8 Nov 2021 11:25:51 -0600 Subject: [PATCH] fix: include defined globals in content-scripts --- lib/index.ts | 2 -- lib/src/build-script.ts | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 794d91ac..788ef799 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -236,8 +236,6 @@ export default function browserExtension( }, rollupOptions: { output: { - // Turn off chunking - manualChunks: undefined, // Remove hashes from output filenames for consistent builds entryFileNames: "[name].js", chunkFileNames: "[name].js", diff --git a/lib/src/build-script.ts b/lib/src/build-script.ts index 5ce892d6..8a445698 100644 --- a/lib/src/build-script.ts +++ b/lib/src/build-script.ts @@ -22,6 +22,7 @@ export async function buildScript(config: BuildScriptConfig) { plugin && (!("name" in plugin) || plugin.name !== "vite-plugin-web-extension") ), + define: config.vite.define, build: { emptyOutDir: false, outDir,