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

[Feature] Enable code splitting in main branch #20

Open
mnlbox opened this issue Jul 7, 2020 · 1 comment
Open

[Feature] Enable code splitting in main branch #20

mnlbox opened this issue Jul 7, 2020 · 1 comment

Comments

@mnlbox
Copy link

mnlbox commented Jul 7, 2020

I think it's a good idea to enable code splitting and esm export together in the main branch. Then we can have esm and also split cjs version together. And use our component in both ways like this for es import:

import { Button } from 'component-library'

and like this, if we have default export:

import Button from 'component-library/src/Button'

or like this, of we have named export:

import { Button } from 'component-library/src/Button'

@HarveyD What's your idea?

@mnlbox mnlbox changed the title Enable code splitting in main branch [Feature] Enable code splitting in main branch Jul 7, 2020
@HarveyD
Copy link
Owner

HarveyD commented Jul 11, 2020

I don't want to include code splitting in the main branch due to the issues that exist around with code splitting and bundling 3rd party dependencies. If I can sort this out, I'd consider it :).

Also, I don't believe you can have cjs and esm code split outputs in the same directory. This increases the length of our imports which I'd rather avoid.

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

No branches or pull requests

2 participants