-
Notifications
You must be signed in to change notification settings - Fork 5
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
chore: Use vite #208
chore: Use vite #208
Conversation
e9dda68
to
d9a4e18
Compare
a710e67
to
ab4ebdf
Compare
22a5ed1
to
d63ef9b
Compare
N.b. I had to increase my |
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.
Have run locally - builds are dreamily fast (feels instant) - I'd be keen to use vite in other projects having seen it in action here.
Have run in Composer and all is working as expected, though we'll need to update the expected name of the stylesheet which is now style.css
rather than index.css
.
π This PR is included in version 5.13.0 π The release is available on: Your semantic-release bot π¦π |
NB: depends on #209 β please review that first π
What does this change?
Swaps out rollup in favour of vite to handle our dev and production builds. (Vite uses rollup under the hood for the build process.)
Why?
Working with this library locally, the current, rollup-based workflow takes a very long time to reflect your changes in a development environment (between 10-20s) Once the build is ready, you must refresh your browser to see changes.
Vite's built to improve that experience:
Vite doesn't provide on-the-fly typechecking out of the box, so we've added it by forking the server process and running
tsc
in watch mode in parallel viarun-p
.How to test
NB: As our dev-nginx config has had to change to enable Vite to talk to the site over websockets, I've taken the opportunity to change the local domain for consistency with other services. Update your dev-nginx configuration with
dev-nginx setup-app ./nginx/nginx-mapping.yaml
before running these changes. The app now runs athttps://prosemirror-typerighter.local.dev-gutools.co.uk
.prosemirror-typerighter
locally, and use it in a consuming project, e.g.flexible-content
, linking it via yalc (or similar).. It should continue to work as normal. (Very happy to pair on this!)