Skip to content

Commit

Permalink
Merge pull request #32 from alexzurbonsen/pr32
Browse files Browse the repository at this point in the history
split popup bundle to satisfy size limit on Mozilla Add On platform
  • Loading branch information
alexzurbonsen authored Oct 22, 2024
2 parents 9f705fb + a04e56c commit 4f66411
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 4f66411

Please sign in to comment.