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

Importing a named export returns undefined when there's default and named exports #5632

Closed
3 tasks done
davidblnc opened this issue Apr 3, 2021 · 0 comments · Fixed by #5798
Closed
3 tasks done
Assignees
Labels
🐛 Bug 🎒 Bundler Refers to CodeSandbox's In-Browser Bundler

Comments

@davidblnc
Copy link

🐛 bug report

Preflight Checklist

  • I have read the
    Contributing Guidelines
    for this project.
  • I agree to follow the
    Code of Conduct
    that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

(At least starting with a Vue template) If you try to import a named export from a component (where there's also the default export of the component per se), you always end up with undefined

How has this issue affected you? What are you trying to accomplish?

Cannot declare shared variables between components.

To Reproduce

In the provided sandbox, look at the console output. The variable "testExport" is imported in App.vue from components/HelloWorld.vue.

Link to sandbox: Link to sandbox (optional)

Your Environment

Software Name/Version
Сodesandbox
Browser Firefox 87.0
Operating System Windows 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug 🎒 Bundler Refers to CodeSandbox's In-Browser Bundler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants