-
Notifications
You must be signed in to change notification settings - Fork 2
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
Can't serve more than one webview per vite project #280
Comments
Quickly testing bundled extensions to prove the issue exists in them also proved successful, unfortunately. I created a second React web view that imports |
Err... don't we want it bundled like that and to get it working in WebViews? Otherwise if we have 100 WebViews all using |
What happens when you insert a script tag with src? |
Particularly with |
Regarding option 4 about loading modules in webviews: Looks like synchronously loading modules pretty much absolutely requires using |
paranext/paranext-extension-template@ed07cee
|
Fixed the following as part of this work: |
Extension developers want to create more than one web view per extension. Because of how Vite bundles dependencies, this is not currently possible.
You can't copy dependencies into each web view separately. It seems Vite has rejected this request multiple times and is probably not going to do it. This means we can't really support multiple webviews per extension with our template right now. We have a few options:
Conclusion: use webpack
The text was updated successfully, but these errors were encountered: