We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getCurrentInstance
⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.
If I re-export Vue's getCurrentInstance from a package inside node_modules, it always returns null during SSR.
node_modules
null
Create a package, for example:
packages/playground/ssr-vue/node_modules/foo/index.js:
packages/playground/ssr-vue/node_modules/foo/index.js
export { getCurrentInstance } from 'vue'
packages/playground/ssr-vue/node_modules/foo/package.json:
packages/playground/ssr-vue/node_modules/foo/package.json
{ "name": "foo" }
packages/playground/ssr-vue/App.vue:
packages/playground/ssr-vue/App.vue
<script lang="ts" setup> import { getCurrentInstance } from 'foo' console.log(getCurrentInstance()) //=> null in ssr </script>
vite
vite build
--debug
The text was updated successfully, but these errors were encountered:
d021506
No branches or pull requests
Describe the bug
If I re-export Vue's
getCurrentInstance
from a package insidenode_modules
, it always returnsnull
during SSR.Reproduction
Create a package, for example:
packages/playground/ssr-vue/node_modules/foo/index.js
:packages/playground/ssr-vue/node_modules/foo/package.json
:packages/playground/ssr-vue/App.vue
:System Info
vite
version: 2.0.0-beta.63 (main #b065ede3)Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: