-
Notifications
You must be signed in to change notification settings - Fork 92
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
Create a local bundler to run in development mode #1662
Comments
@jmcphers and @softwarenerd let me know if you have any great insights on this. There's not an immediate need to upgrade, but as time goes on I think these limitations are going to get more painful (the react 18 release has been out already over 1.5 years, and is used by all base Positron components) |
I think this might also prevent me from adding For example if we do:
The console should confirm these are both functions that can be parsed as React Components, but the type for the In general it seems like relying on |
Locally running |
This issue is motivated by the following:
We are currently blocked on the upgrade to V5 of React Query.
V5 removed the umd directory from the builds, and converted the module type from common JS module to ES module. This isn't a problem for production mode where we use a bundler, but in development mode, we don't have a bundler and so we have some hacks for reading in the local source files created when we build. We can't do this with react query v5, and if any other tanstack libraries do a similar change, we won't be able to upgrade them either.
Originally posted by @jgutman in #1659 (comment)
This is also seems to be blocking the upgrade to React 18. In v18 of React DOM, some of the critical functionality has moved into
react-dom/client
, in particular this piece here. To upgrade, we would need to import like this:import * as ReactDOMClient from 'react-dom/client';
However, if we are using our substitute for a bundler and just adding
react-dom/umd/react-dom.development.js
to the source code, then development mode is not able to find the source code'react-dom/client'
and we get a reference error forReactDOMClient
This seems like possibly the same issue that prompted this patch in the main application when in development mode:
positron/src/vs/loader.js
Lines 1601 to 1634 in 1f7e74c
but unfortunately we can't just switch to adding
react-dom/client.js
from the extension's node_modules folder instead, that breaks as well.The text was updated successfully, but these errors were encountered: