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

Async loading of dash-vtk for multi-page apps #28

Closed
xhluca opened this issue Feb 18, 2021 · 2 comments · Fixed by #29
Closed

Async loading of dash-vtk for multi-page apps #28

xhluca opened this issue Feb 18, 2021 · 2 comments · Fixed by #29
Assignees

Comments

@xhluca
Copy link

xhluca commented Feb 18, 2021

Since the bundle for dash-vtk is quite large (1MB), it might be beneficial for multi-page apps (such as dash-docs) if dash-vtk is loaded asynchronously, such that people that do not visit the page(s) featuring dash-vtk don't have to load the bundle.

I think this PR shows how to add async components: plotly/dash-core-components#739

^^ @chriddyp correct me if it's not the correct PR

@xhluca xhluca self-assigned this Feb 18, 2021
@xhluca
Copy link
Author

xhluca commented Feb 18, 2021

If this doesn't involve changing the source code for dash-vtk I should be able to handle it.

@xhluca
Copy link
Author

xhluca commented Feb 18, 2021

Ok so it seems it only works when there's a default export: https://reactjs.org/docs/code-splitting.html#named-exports

Might need to change some imports in this case.

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 a pull request may close this issue.

1 participant