npm/documentation

When Vite interalizes pinia for SSR, it attempts to import default from 'vue' package

Closed this issue · 1 comments

Using vue 3.4.15, vite 5.0.4, and pinia 2.1.7.

Vite config includes the following to internalize pinia and externalize vue.
noExternal: true,
external: { 'vue' ....}

In this case, the resulting SSR output include a line like:
import $require0, { ....} from 'vue';
where the variable $require0 is used only in the pinia code.

A workaround is to externalize pinia, but ideally pinia would not expect vue package to have a default export.

This sounds like an issue to file in pinia, not on npm's documentation repo.