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

Improve package loading compatibility in documentation #37

Open
portokallidis opened this issue Jul 8, 2021 · 3 comments
Open

Improve package loading compatibility in documentation #37

portokallidis opened this issue Jul 8, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@portokallidis
Copy link

In some cases the import fails when trying to use the default export so its better if you also include aliases in the docs.
import * as WolframNotebookEmbedder from 'wolfram-notebook-embedder'

@poeschko
Copy link
Contributor

poeschko commented Oct 2, 2021

Any chance you could point us to a full example that demonstrates the failing import?

@portokallidis
Copy link
Author

Sure, here is a typical vanilla js project with a bundler.
https://codesandbox.io/s/wolfram-notebook-embedder-import-demo-o2wv7?file=/src/index.js

You can switch 3rd and 4th line to see what i mean.

@poeschko
Copy link
Contributor

poeschko commented Oct 4, 2021

Thank you!

I'm adding a default export as a courtesy, but also changing the documentation to encourage the named import (import * as WolframNotebookEmbedder or import {embed}).

@poeschko poeschko added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants