-
Notifications
You must be signed in to change notification settings - Fork 187
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
Move to vite from react-app-rewired for example project development build #2411
Comments
Hi 👋 I have a question here. I just did some research, and I found Vite does provide a faster development experience because it supports unbundled ESM in development. As for production, it uses Rollup to bundle the code under the hood. The Ketcher codebase is a monorepo If I understand correctly, so we have to build packages every time we develop. Every time we develop in localhost, we should run If I replace Rollup with Vite, I'd probably want to make Maybe I'm wrong, but If there are some ways we can use |
(This is an investigation diary, not a final proposal) My plan to switch to Vite is: For /packages
For /example:
What I'm doing today is try to rewrite My estimate for the whole switch is 5 days. Next week we have a public holiday on Wed, and I want to take two more regular vacations on Mon and Tue. So I'll try to finish by the end of this Friday. |
(This is an investigation diary, not a final proposal) Have successfully moved to Vite in ketcher-core, but the build speed is almost the same as before. Today I was working on rewriting What enlightened me is
So I think I need to change my mind. My plan for tomorrow:
|
…ment build (#2487) * #2411 - Add new Vite based command to example for development * #2411 - Add icons to entry html * #2411 - Ignore dist/index.css * #2411 - Fix dropdown icon of tool to show * #2411 - Fix class variable members being assigned `undefined` when initialization * #2411 - Fix uncaught referenceError - cannot access 'clientX' before initialization * #2411 - Eject webpack env to vite * #2411 - Replace CommonJS with ESM * #2411 - Add dev tsconfig for ketcher-core TS intelliSense * #2411 - Refactor customResolver to resolve same aliases from different packages * #2411 - Update Vite entry to public/index.html * #2411 - Fix dist files not containing index.d.ts * #2411 - Ignore warning which shouldn't be warned * #2411 - Fix duplicated imports * #2411 - Add paths to tsconfig to enable ketcher-core TS intelliSense * Revert "#2411 - Fix duplicated imports" This reverts commit 0a0c451. * Revert "#2411 - Replace CommonJS with ESM" This reverts commit 52acf6d. * #2411 - Replace commonJS with dynamic ESM * Revert "#2411 - Replace commonJS with dynamic ESM" This reverts commit ad5577a. * #2411 - Replace commonjs with dynamic ESM * #2411 - Fix missing CSS source file warning * #2411 - Add comment to vite alias config * #2411 - Upgrade Vite to 4.3.1 * #2411 - Update Vite to new patch version
Background
We are currently using rollup.js for building the project, this library seems to be outdated and we have problems with builds taking too much time.
Solution
We would like to switch to a different build library, vite.js seems like a good solution: https://vitejs.dev
Alternatives
Additional context
As part of this ticket, we would like to try and switch the build process from using rollup to using vite, this will involve updating all package.json files across ./packages and ./example and testing the local build timing on various systems
The text was updated successfully, but these errors were encountered: