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

code splitting support #42

Closed
swyxio opened this issue Apr 30, 2019 · 7 comments
Closed

code splitting support #42

swyxio opened this issue Apr 30, 2019 · 7 comments
Labels
topic: multi-entry Related to multi-entry support

Comments

@swyxio
Copy link
Collaborator

swyxio commented Apr 30, 2019

Current Behavior

currently we bundle single files, named per environment/module format.

to support code splitting (which is the default behavior of Rollup v1 which we just upgraded to) we'll have to evolve this to a folder format with multiple files.

right now this https://github.com/sw-yx/react-netlify-identity-widget/blob/master/src/index.tsx#L8 doesnt produce a separate bundle for me :(

Desired Behavior

code splitting support.

Suggested Solution

as above

Who does this impact? Who is this for?

all users, partiuclarly React users, who want to offer code splitting as a feature

Describe alternatives you've considered

no change

Additional context

i'm unsure what existing priorities this may conflict with for you.

@swyxio
Copy link
Collaborator Author

swyxio commented Apr 30, 2019

important caveat - Rollup does not have code splitting support for UMD builds, which somewhat complicates things. so may just need to not offer UMD for code splitting builds. is this a dealbreaker?

@swyxio
Copy link
Collaborator Author

swyxio commented Apr 30, 2019

further investigation: using code splitting means we have random named chunks, and i get Error: output file in rollup options should be specified error with
@TrySound's rollup_plugin_size_snapshot. i've disabled it for now as i dont reallycare about the snapshot based on this (TrySound/rollup-plugin-size-snapshot#23) it seems it just wasnt designed with code splitting in mind.

@jaredpalmer
Copy link
Owner

I need to read more about Rollup code splitting as I don’t understand how it would be beneficial for a library

@TrySound
Copy link
Collaborator

I will fix size snapshot when I will have a time.

@jaredpalmer
Copy link
Owner

I just skimmed the docs. @sw-yx Can you elaborate more on the use case? I don't really understand why you want to code split identity widget itself in the first place. Instead, it makes more sense to just show consumers how to code split the the entire login route / modal?

@swyxio
Copy link
Collaborator Author

swyxio commented Apr 30, 2019

yeah. i withdraw my stupid idea. :) thanks for humoring me

@swyxio swyxio closed this as completed Apr 30, 2019
@agilgur5
Copy link
Collaborator

Code-splitting is currently supported by #367

@agilgur5 agilgur5 added the topic: multi-entry Related to multi-entry support label Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: multi-entry Related to multi-entry support
Projects
None yet
Development

No branches or pull requests

4 participants