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

Load external libraries via CDNs in plugins #71

Open
GoelBiju opened this issue Dec 19, 2021 · 1 comment
Open

Load external libraries via CDNs in plugins #71

GoelBiju opened this issue Dec 19, 2021 · 1 comment
Labels
Frontend Issues related to the frontend application question Further information is requested

Comments

@GoelBiju
Copy link
Owner

GoelBiju commented Dec 19, 2021

Description:

It seems any libraries we use via CDN defined in the public/index.html in plugins do not load. Instead, it has to be placed on the front-end in order for it to load. The libraries that a plugin uses need to be able to be used as packages or loaded from CDN in the plugin.

This is not an exact bug since the "index.html" in each plugin is for it to run independently of the frontend in development i.e. this is why we have separate React CDN links in there. However, for libraries like Plotly where the example we are using require a CDN, we may need to use another method to fetch the library.

@GoelBiju GoelBiju added bug Something isn't working question Further information is requested labels Dec 19, 2021
@GoelBiju
Copy link
Owner Author

GoelBiju commented Dec 19, 2021

Description:

It seems any libraries we use via CDN defined in the public/index.html in plugins do not load. Instead, it has to be placed on the front-end in order for it to load. The libraries that a plugin uses need to be able to be used as packages or loaded from CDN in the plugin.

This is not an exact bug since the "index.html" in each plugin is for it to run independently of the frontend in development i.e. this is why we have separate React CDN links in there. However, for libraries like Plotly where the example we are using require a CDN, we may need to use another method to fetch the library.

Since the example for Plotly is unique we would generally assume all the relevant plugins are packaged with webpack but instead we want to make use of a CDN should we provide a configuration with links which is injected into the frontend? Or could we use Externals (possibly very similar to this question?

@GoelBiju GoelBiju changed the title Libraries defined in "index.html" in plugins do not load Load external libraries via CDNs in plugins Dec 19, 2021
@GoelBiju GoelBiju added Frontend Issues related to the frontend application and removed bug Something isn't working labels Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Issues related to the frontend application question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant