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,