-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Exploration of hot reloading of renderers in notebooks w/ Webpack #95908
Comments
/cc @rebornix |
@connor4312 really good work!
Currently the code tries to restrict the resource to be local ones, thus it rewrites the
As we discussed offline, something like
I prefer scaffold/starter code than npm packages which hide the details. My feeling is extension authors need to understand what's going on under the hood at the end once they introduce more libraries/packages into the web pack config. |
This one is interesting. When the webview is refreshed, we need to render cell outputs again which are currently visible. Not sure yet if we have a hook in WebView or not. If there is one we should listen to it and trigger a viewport re-render. |
webpack is
Issue linked :)
Makes sense. I can, once we stabilize a bit more 🙂, add a
👍 |
Is allowing
👍 we can add notebook option and show |
Yea I think that should be fine |
microsoft/vscode-notebook-renderer-starter@0c1f613
Documenting my brute-force path to get it working:
uniqueName
otherwise their bundle could fail in interesting ways if other renderers use Webpack as wellnull
host. Not a big deal, can be given in the templateinline-source-map
this.preloads
doesn't support loading http urls. Just put the<script>
tag directly in my render output for nownull
doesn't work for the "hot" manifest (even though that allowed the websocket to initially connect). Need to justdisableHostCheck
instead? Nope, seems we need to manually setheaders
: CORS issue with "webpack-dev-server": "^1.14.1" webpack/webpack-dev-server#533 (comment)Here's the resulting code:
Outcomes/questions:
preloads
accept HTTP URLs? It always changes the scheme tovscode-resource
, e.g.vscode-resource://localhost:8116/out/client.bundle.js
Allow preloading http resources from localhost in notebooks #95988Should we provide a standard API in notebooks, or an npm module, that implements the "bootstrap" code I linked above? Or maybe being in the starter is fine.Part of the starter codeThe text was updated successfully, but these errors were encountered: