-
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
feat!: migrate to vue 3 #5324
feat!: migrate to vue 3 #5324
Conversation
BREAKING CHANGE: only supports Vue 3 APIs and only provides Vue 3 components
* changed all import { gql } statements * added babel transformer to jandle import.meta.url in jest * fixed route handling in authentication guard * fixed jest svg transform * changed updateProps to rerender in specs
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
BREAKING CHANGE: import.meta support required. Baidu, QQ, UC, and KaiOs browsers not supported.
This comment was marked as resolved.
This comment was marked as resolved.
Ok, just pushed up a fix for Prefetching is in an unstable state. It currently will only work as long as all the components are using the options api. For any component that uses the composition api they will not have a prefetch option and none of the prefetches will be called for any of their child components. I've looked into the various ways we can do prefetching in vue 3, and there isn't any easy solution. There is a super easy and useful serverPrefetch hook, but it only gets called during SSR, so client-side prefetching before navigation isn't supported. For the client-side we would need to use a combination of beforeRouteEnter and beforeRouteUpdate. So to do the same sort of prefetching we are doing today, we would need to define the data fetch in 3 different hooks in each component, each hook using a slightly different format. I would recommend that we try to replace prefetching with loading data after page navigation. This will require rewriting some components and adding loading states for many pages (blank areas are ok, no need for loading placeholders/spinners everywhere as long as content shifting is avoided). On the plus side it will mean much faster performance for server renders and better perceived client-side performance. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Minification verified (working) and performance tests ran locally (Lighthouse scores more or less match dev env with Vue 2 running). Next step is deploying to dev and running through functional and Lighthouse tests again: https://kiva.atlassian.net/browse/MP-718 |
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.
I think it's go time for this...
🎉 This PR is included in version 3.0.0-rc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Initial PR for migrating from webpack & vue 2 to vite & vue 3. This still has many issues but the overall functionality is there. I've had to manually roll-back changes while working on this and change some parts multiple times, so there are some minor related issues that still need to be cleaned up. The general process for developing this has been cycling through running
npm run build
,npm run lint
,npm run unit
,npm run storybook
,npm run dev -- --config=local
, andnpm start -- --config=local
, and fixing any errors that arise.References
https://vueschool.io/articles/vuejs-tutorials/how-to-migrate-from-vue-cli-to-vite/
https://www.sitepoint.com/webpack-vite-migration/
https://vitejs.dev/guide/ssr
https://storybook.js.org/docs/migration-guide/from-older-version
Tasks completed
"type": "module"
defineAsyncComponent
for all async component imports>>>
with:deep()
/
withmath.div()
in sass & scssimport '@/...'
withimport '#src/...'
and removed@
aliasalgolia
and related componentsworkerpool
forpiscina
updateProps
torerender
in specsTODO
manifest.webmanifest
) to have full URLsrc
properties -> warnings can be seen after runningnpm run build
andnpm start -- --config=local
htmlPurge
invite.config.js
Items to review/QA
These are things that have changed in this PR that need review/QA, and issues that have popped up while developing that still need to be addressed.
Setup local development
Note: Your terminal app must be running with Rosetta for backwards compatibility with some of our dependencies,
canvas
in particular.