Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Optimise webpack to reduce bundle size #44

Open
goastler opened this issue Oct 25, 2022 · 2 comments
Open

Optimise webpack to reduce bundle size #44

goastler opened this issue Oct 25, 2022 · 2 comments
Assignees
Labels
dev Product development

Comments

@goastler
Copy link
Member

switch to default imports, e.g.

import Xyz from "blah/Xyz";

instead of

import {Xyz} from "blah";

@forgetso forgetso added this to the Web2 milestone Jan 11, 2023
@goastler goastler added web2 web2 functionality dev Product development labels Mar 30, 2023
@forgetso forgetso removed the web2 web2 functionality label Apr 12, 2023
@HughParry HughParry self-assigned this Apr 27, 2023
@forgetso forgetso self-assigned this May 10, 2023
@forgetso forgetso changed the title optimise imports to reduce bundle size Optimise webpack to reduce bundle size May 15, 2023
@forgetso
Copy link
Member

forgetso commented May 15, 2023

Optimisations

Tasks for this issue.

  • Absolute imports (see above)
  • How do we import absolutely from our own packages? import { encodeStringAddress } from '@prosopo/provider/src/util' or import { encodeStringAddress } from '@prosopo/provider/dist/util'
  • Ensure that non-required packages are not bundled by whitelisting packages or some other method.
  • What's going with react-jsx? There was an error when whitelisting in the production build.
  • Create process for white listing packages in future and ensure that new packages will be added to the white list. (webpack plugin or manually maintained list or something else?)
  • Chunk packages appropriately - is cache shared across web pages?
  • Create a bundle that does not include react, for websites on which it is already available (optional)

@HughParry
Copy link

follow on ticket for improvements, mvp this ticket

@forgetso forgetso removed this from the Web2 milestone Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dev Product development
Projects
None yet
Development

No branches or pull requests

3 participants