Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to reduce bundle size #197

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Attempt to reduce bundle size #197

wants to merge 5 commits into from

Conversation

rap1ds
Copy link
Member

@rap1ds rap1ds commented May 13, 2024

This PR attempts to reduce SDK bundle size by picking couple low-hanging fruits.

  • Update jsonwebtoken package
    • This didn't seem to affect the bundle size
  • Start using babel lodash plugin
    • It seems that we were already using this plugin. Adding the webpack config entry seemed to reduce the bundle size a bit, but not much (maybe 20kb, unzipped).

In addition, this PR fixes yarn install and yarn build.

yarn run build failed to run, due to following error:

    ERROR in sharetribe-flex-sdk-web.js from Terser
    Error: error:0308010C:digital envelope routines::unsupported

Read more here: webpack/webpack#14532

To fix the issue:

- Upgrade webpack to 4.47.0 (see: webpack/webpack#17628)
- Add `resolutions` block for terser-webpack-plugin until this PR is
  merged (webpack/webpack#17659)
fsevents added support for Apple Silicon in v2.3
This will potentially reduce bundle size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant