-
Notifications
You must be signed in to change notification settings - Fork 16
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
Migrate demo from CRA to Vite #942
Conversation
2248e5c
to
6a3a034
Compare
Alright, so as mentioned in the chat, removing the global styles imports from the Instead of trying to find a sub-optimal solution that works for both the dev/build of the demo/Storybook and the build of the packages, I decided to take care of the problem on its own. In the process, I managed to solve the problem of having to import two stylesheets when consuming the I've explained how the packages are now build in details in the |
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.
👏
973dd4f
to
7700923
Compare
Tested on FF 60 (i.e. the "browser not supported" error shows up as expected).
EDIT - Summary of changes:
demo
is now based on Vite instead of CRA and no longer requires aconfig-override.js
file to work.REACT_APP_DIST
andSTORYBOOK_DIST
have been removed, as testing distributed packages this way is not sufficiently reliable and not worth the complexity it adds to the monorepo. Distributed packages can be tested by publishing beta versions. The four Codesandboxes (Add CRA and Vite sandboxes and fix @h5web/lib stylesheet export #938) are available to test the published packages reliably inside both CRA and Vite apps before publishing official releases.vite.styles.config.js
) and a separate entrypoint (src/styles.ts
).@h5web/app
now need to import a single stylesheet instead of two.pnpm packages
(no need to runpnpm packages:dts
afterwards, as this is now done automatically).