-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 frontend to Vite 5 #2775
Move frontend to Vite 5 #2775
Conversation
@u5r0 Thank you! We will need to fix the missing pieces before merging it. Especially the typescript part :) I can give it a shot too and see if I can fix that, or maybe other contributors could give a hand! Quick question, why are you removing the icons? |
No reason, they're unused yet and seemed in the way. Is there a preference for the testing setup? Does the |
@u5r0 No, front and server should be completely independent (except for VScode config because VScode does not allow to scope its settings by folder, but it should not impact this PR) |
910e1d3
to
965fc3c
Compare
b1c896c
to
b61de83
Compare
@u5r0 I will tentatively merge your PR (switching to vite) and move to a mono-repo architecture this week-end! |
- A couple of CJS modules into ESM (config mostly) - Vite complains about node.js modules: fixed `useIsMatchingLocation.ts` > or use rollupOptions in vite.config.ts > ref: https://github.com/saleor/saleor-dashboard/blob/f0e4f59d97e2a8c3e22bd2af7b7ce68a361fc9a4/vite.config.js#L6 - Adjust Storybook to work with Vite: use @storybook/test - Use SWC for jest tranformations - Remove unused deps: - ts-jest: replaced with @swc/jest, typecheck by `tsc` - babel plugins - @svgr/plugin-jsx: not used - @testing-library/user-event: handled by @storybook/test - @typescript-eslint/utils: was not plugged in - tsup, esbuild-plugin-svgr: will look into that later - Install Vite required deps, and remove craco/webpack deps - Adjust SVG to work with Vite as components - Fixed `Step.tsx`: I dont know if one should be swaped for the other, but there should be no slash - Initial formating and linting: - removed empty object params - sorting imports, etc..
This is great! It's indeed way faster and consuming less resources. I'm investigating this one yarn build seems to be broken (I think it's because it's more rigourous on typing, I'll dive onto that too). Then I'm in favor of merging and iterating on it during next week |
TODOs/FIXMEs:
|
Ok, I think it's due to our code not being correctly implemented. Icons are loaded multiple times concurrently and recoil does not like it. We can fix it by introducing an IconProvider |
Let's merge it! |
@u5r0 Twenty-front is now using vite! Congratulations and thank you for the work! |
Changes:
@storybook/jest
and@storybook/testing-library
Tested
Not tested:
chromatic
andgraphql
codegen commandsNot working
related: #2156