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

Import named export #9947

Closed
lacherogwu opened this issue Dec 30, 2023 · 2 comments
Closed

Import named export #9947

lacherogwu opened this issue Dec 30, 2023 · 2 comments
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. regression

Comments

@lacherogwu
Copy link

Vue version

^3.3.11

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-882jdu?file=src%2FApp.vue

Steps to reproduce

  1. Export a component from an index.ts file with a named export
  2. Import that component in another component using import * as X from './some-index-file.ts'
  3. Use the component
<template>
  <X.Comp />
</template>

What is expected?

The components to render

What is actually happening?

App.vue:7 Uncaught TypeError: Cannot read properties of undefined (reading 'Id')
at Proxy._sfc_render (App.vue:7:24)
at renderComponentRoot (runtime-core.esm-bundler.js:870:16)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js:5972:46)
at ReactiveEffect.run (reactivity.esm-bundler.js:170:19)
at instance.update (runtime-core.esm-bundler.js:6103:16)
at setupRenderEffect (runtime-core.esm-bundler.js:6113:5)
at mountComponent (runtime-core.esm-bundler.js:5881:7)
at processComponent (runtime-core.esm-bundler.js:5835:9)
at patch (runtime-core.esm-bundler.js:5307:11)
at render2 (runtime-core.esm-bundler.js:6623:7)

System Info

No response

Any additional comments?

No response

@ATQQ
Copy link

ATQQ commented Dec 30, 2023

I had the same problem,when I use vue-command-palette@0.1.4 in Vue@latest (3.4.1)

import { Command } from 'vue-command-palette'
<Command.Dialog>
    <!-- xxx -->
</Command.Dialog>

A screenshot of my error is below

image

So I'm rolling back now 3.3.13,can solve this problem

@yyx990803 yyx990803 added regression 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Dec 30, 2023
@gigabites19
Copy link

This is a cool pattern, thanks for sharing

@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. regression
Projects
None yet
Development

No branches or pull requests

4 participants