From a04e56ce6b417443db309bd272acf7c4efceed55 Mon Sep 17 00:00:00 2001 From: Alexander zur Bonsen Date: Tue, 22 Oct 2024 21:40:27 +0200 Subject: [PATCH] split popup bundle to satisfy size limit on Mozilla Add On platform Summary: Test Plan: --- webpack.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index d720b64..6e01980 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -37,8 +37,11 @@ module.exports = (env) => { entry: { background: path.join(sourcePath, 'background-script', 'main.ts'), content: path.join(sourcePath, 'content-script', 'main.ts'), - popup: path.join(sourcePath, 'popup', 'index.tsx'), - // options: path.join(sourcePath, 'options', 'index.tsx'), + popup: { + import: path.join(sourcePath, 'popup', 'index.tsx'), + dependOn: ['nivo'], + }, + nivo: ['@nivo/pie'], // to submit to Mozilla Add Ons, the size limit for a single file is 4 MB, splitting nivo to reduce popup bundle size }, output: { path: path.join(outputPath, env.browser),