-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: Add Pinia support #12707
feat: Add Pinia support #12707
Conversation
PERFECT timing. One thing to explore is the SSR state serialization/deserialization of the Pinia store. The equivalence of what we do for Vuex. The setup needs Quasar v2.6 in order for SSR to work (for both app-webpack and app-vite). Wanna dig into this tomorrow or would u like me to do it? |
I was actually going to continue with the SSR stuff and docs, as I noted them as TODO and marked the PR as draft. But, it seems like you've needed it just in time, so I will continue with them in separate PRs. I already somewhat know what the solution will be like, so I will continue working tomorrow. |
@yusufkandemir will push something for app-vite in quasar-config-file that you'll need tomorrow (#initialVersions.pinia/vuex) --> so that templates/entry/client and server can be handled differently for each store. store.replaceStore for Vuex and Pinia's equivalent stuff Sorry for talking briefly. On a hurry to release all the stuff. PS: you're amazing! keep it going |
For SSR it is absolutely necessary to build the /ui package and use it. Both app-webpack and app-vite will break without it on SSR otherwise. |
Just saw the draft PR. Your approach actually doesn't require my stuff. Sniffing should work better than wasting time and resources checking for Vuex and Pinia installation. |
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
dev
branch (orv[X]
branch)Other information:
TODO:
To test it locally:
./quasar/create-app/index.js # your local path might be different
Note: Linting with TS projects doesn't work OOTB, because
create-app
is WIP. So, you might want to not choose the linting feature. Alternatively, you can update.eslintrc.js
'sparserOptions
section to this:cd into the project you've created.
Update
package.json
of the created projects to use the local packages:src/pages/Index.vue
to actually use the example store:yarn quasar dev # or just "quasar dev"