-
Notifications
You must be signed in to change notification settings - Fork 8
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
GEN-126: Migrate hCore from Webpack 4 to Vite #53
Conversation
I've got the build sorted now, now just need to sort out what's up with the web workers. |
I've pulled in some foundational upgrades that make this significantly easier to work on.
|
PR todos:
|
- remove sentry.io - .gitignore 'dist' - include 'embed.html' in the output
…ettier caching; sundry
- Turns out promise.resolve().then() doesn't actually accomplish the equivalent of a setImmediate. I was mislead by something online, oh well... setTimeout works. - The main simulation worker was breaking when you used the 'run' functionality because the thread would lock. A setTimeout (and previously, setImmediate) was needed to allow other events in the thread.
Promoted out of draft mode-- I've got core back to its functionality, but now without a huge amount of aged cruft. I haven't looked at the Vercel build yet. @CiaranMn if you could take a glance at that I'd be appreciative. |
This file was ignored and persisted across branches, thus causing fresh checkouts to break (as Vite no longer generates this) but existing checkouts to act "normal". I've removed the files and its special cases entirely, and added its contents into types.ts. This now repairs the build. Next up is pruning out the unused generated items and only keeping the relevant ones.
Vercel should be fixed. Will return to this and give myself a self-review, then it can merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completed self-review, PR is ready to merge
🎉 Awesome work, thanks Jude! |
I was having trouble adding in modern libraries, such as oktokit, without hitting lots of babel and webpack-induced hurdles. By switching to vite, we stop using webpack and babel for 'core', instead making use of vite's defaults.
This review is still a draft-- While the site is online, there's some sort of communication problem with the web workers where they won't start/stop simulations (however single steps work fine). Additionally the 'build' step fails with an OOM error on my computer... this might be resolved by a bigger computer, or ideally by a smarter build config.