Usage with Nuxt3 (SSR)
See original GitHub issueHello! Thanks for great package. My problem:
- Nuxt 3, vue 3, pinia 2.0
- Create plugin, code:
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import {NuxtApp} from 'nuxt3';
export default function ({$pinia, ssrContext}: NuxtApp) {
$pinia.use(piniaPluginPersistedstate);
}
- Then I create build (ssr enabled) and then start server, I get this error:
extender is not a function
at file://./server/node_modules/pinia/dist/pinia.mjs:1556:43
- This block of code in pinia.mjs:
// apply all plugins
pinia._p.forEach((extender) => {
assign(store, scope.run(() => extender({
store,
app: pinia._a,
pinia,
options: optionsForPlugin,
})));
})
How should i use package correctly with nuxt3 ssr?
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Server Side Rendering - Nuxt
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in...
Read more >How To Use Server-Side Rendering with Nuxt.js | DigitalOcean
With Nuxt, all of your routes are generated from .vue files in the pages directory. Inside of these pages you can fetch data...
Read more >How To Create A Nuxt 3 Vue.js App With SSR In Seconds!
Transcript · Why Use Nuxt JS 3 Beta?! (Vue.js 3 With Nuxt Tutorial!!) · Create A Website In VSCode In Less Then A...
Read more >Creating Server-side Rendered Vue.js Apps Using Nuxt.js
Nuxt.js is based off an implementation of SSR for the popular React library ... To start off, let's use a Vue project generator...
Read more >Rendering Modes in Nuxt 3 - This Dot Labs
To deploy and use our Nuxt 3 application on a node-server in universal mode: First in nuxt.config.js file. defineNuxtConfig({ ssr: true ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok here’s a working store definition using Nuxt’s
useCookie
:Hi, thanks for using it! I haven’t looked much into Nuxt 3 yet, I was waiting for it to go out of beta, but I’ll try to have a look at it when I have some time. I’ll try at least to reproduce it.