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

Build React Naturally #178

Open
andrewpareles opened this issue Dec 15, 2024 · 3 comments · Fixed by #181 · May be fixed by #183
Open

Build React Naturally #178

andrewpareles opened this issue Dec 15, 2024 · 3 comments · Fixed by #181 · May be fixed by #183
Labels
help wanted Extra attention is needed

Comments

@andrewpareles
Copy link
Contributor

andrewpareles commented Dec 15, 2024

This issue might sound boring, but it's one of Void's most important unresolved issues.

In the build instructions, we run npm run buildreact to compile all the files in react/src/*.tsx into react/out/*.js. We then we import those files elsewhere. This is not a great way of working with React because we need to re-build every time we change a React file.

We have two options to fix this problem:

  • Figure out how to allow global imports like 'react' in the browser/ environment so we don't have to build React ourselves. This was possible in vscode's previous yarn edition, and would be the ideal solution.
  • Or, keep bundling the way we do now, but don't crash the build script - this probably means moving build.js's contents into gulpfile.js watch-client.
@andrewpareles andrewpareles added help wanted Extra attention is needed high priority 🚀 High priority issue labels Dec 16, 2024
@bjoaquinc
Copy link
Contributor

bjoaquinc commented Dec 18, 2024

Hey @andrewpareles been working on this and I have a solution that watches changes in the browser environment and auto updates the scope-tailwind, tsup transpilation, and watch-client gulp task (without crashing it). I can make a PR if you're interested?

@andrewpareles
Copy link
Contributor Author

Sounds amazing. Feel free to PR!

@andrewpareles
Copy link
Contributor Author

andrewpareles commented Dec 19, 2024

This fixes the waiting problem! Thanks so much for the PR, it's amazing.

Keeping this issue open for some minor other related items:

In the future it would be great to incorporate this into the gulpfiles so that it 1. auto-watches when you press Ctrl+Shift+B and 2. auto-builds when you run the build script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
2 participants