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

Reduce Bundle Size #6

Open
OR13 opened this issue Jul 15, 2020 · 3 comments
Open

Reduce Bundle Size #6

OR13 opened this issue Jul 15, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@OR13
Copy link
Member

OR13 commented Jul 15, 2020

We made an attempt here: #3

We need help from someone more experience with rollup / typescript / material-ui.

You can see their approach here:

@OR13 OR13 added the help wanted Extra attention is needed label Jul 15, 2020
@gjgd
Copy link
Contributor

gjgd commented Jul 16, 2020

When using this syntax below in a Create React App, the whole library is being bundled which causes the bundle to be huge.

import { JSONEditor } from '@material-did/common'

To reproduce:

git checkout 28ce2c9fd07ba437a131d65ea08744a3afe3698e
cd packages/app
npm run build

A helpful command to debug this and visualize the bundle by dependency is source-map-explorer:

source-map-explorer build/static/js/*.js --html > ./report.html

Ultimately we want to be able to direct import files with a syntax like this:

import JSONEditor from '@material-did/common/JSONEditor'

or

import JSONEditor from '@material-did/common/lib/JSONEditor'

@OR13
Copy link
Member Author

OR13 commented Aug 11, 2020

@OR13
Copy link
Member Author

OR13 commented Aug 11, 2020

Need to do what is described here: jaredpalmer/tsdx#778 (comment) before this gets any bigger....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants