Skip to content
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

fix: nuxtServerInit not working with nuxt-vite #248

Open
mirabledictu opened this issue Aug 8, 2021 · 3 comments
Open

fix: nuxtServerInit not working with nuxt-vite #248

mirabledictu opened this issue Aug 8, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@mirabledictu
Copy link

Hi, it looks like nuxtServerInit ain't working when nuxt-vite and nuxt-typed-vuex are both in buildModules.

Here's a simple reproduction https://github.com/mirabledictu/test-vuex-vite

I have a simple console log there

export const actions = {
    nuxtServerInit(_context) {
        // This will not log if nuxt-typed-vuex is added to buildModules
        console.log('works')
    }
}

and in my nuxt.config.js

  buildModules: [
    // https://go.nuxtjs.dev/typescript
    '@nuxt/typescript-build',
    'nuxt-vite',
    'nuxt-typed-vuex',
  ],

  vite: {
    ssr: true
  }
}

When you try to run it, you will not get any logs from server.

Try to remove nuxt-vite or nuxt-typed-vuex in buildModules and it will work.

@mirabledictu mirabledictu added the bug Something isn't working label Aug 8, 2021
@danielroe
Copy link
Owner

How odd. Note that there are known issues with ssr in nuxt-vite.

@mirabledictu
Copy link
Author

How odd. Note that there are known issues with ssr in nuxt-vite.

Noted on that

@hotrungnhan
Copy link

hotrungnhan commented Sep 19, 2021

not only ssr mode ,but also csr mode . Not work with vite, do you have any plan to fix this isuee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants