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

Stop bundling source files from React NodeGUI #21

Open
shirakaba opened this issue Feb 6, 2021 · 1 comment
Open

Stop bundling source files from React NodeGUI #21

shirakaba opened this issue Feb 6, 2021 · 1 comment

Comments

@shirakaba
Copy link
Collaborator

We're currently bundling some of the source for React NodeGUI in src/dom/react-nodegui, rather than just importing build files from node_modules/react-nodegui.

There was a compelling reason for this, but unfortunately I've forgotten.

We use React NodeGUI in a few places:

I think the reason for copying the source in may have simply been to avoid any coupling with the React side of React NodeGUI. For example, we need to reference src/dom/react-nodegui/src/components/config.ts, but that file in its original state imports from "react-reconciler". I wanted to avoid users having to install react-reconciler into their app bundle. I therefore decoupled that file from "react-reconciler" in this commit: 2acccb1#diff-1fecc56b01094743ee99d3d1c501a51a25634e2faeeb1a8aafbdc44bd7514263. I'm not sure I've made any other changes to the library otherwise (and have been careful not to, as it would make updates harder to manage).

I also recall that I had problems importing the built code, due to a mismatch between esm and commonjs modules.

@shirakaba
Copy link
Collaborator Author

I've now decoupled the React NodeGUI sources from React. Ideally React NodeGUI itself would make similar changes in kind so that we could just import it directly.

d553900

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

1 participant