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

Multiple widgets in a html page doesn't work #73

Open
Bjwebb opened this issue Mar 14, 2019 · 2 comments
Open

Multiple widgets in a html page doesn't work #73

Bjwebb opened this issue Mar 14, 2019 · 2 comments

Comments

@Bjwebb
Copy link

Bjwebb commented Mar 14, 2019

<script src="/js/widget.js"   
        data-schema="schema1.json">
</script>  
<script src="/js/widget.js"
        data-schema="schema2.json">      
</script>                                             

Fails with:

Uncaught Error: only one instance of babel-polyfill is allowed
@paulmeems-waterwatchfoundation

This issue was opened by @Bjwebb after my question at https://stackoverflow.com/questions/54706831/how-to-use-docson-widget-with-sphinx-on-readthedocs

Although I would like to have this issue solved, I reverted back to v1.1.0 of Docson and the problem disappears.

@cwalther
Copy link
Contributor

I didn’t study it in detail, but I seem to be able to avoid this by using src/widget.js instead of public/js/widget.js. Why does widget.js need to go through webpack anyway, it looks pretty self-contained and browser-compatible at a glance?

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

3 participants