Skip to content

Treeshaking issue with conflicting enum value and type name #22416

Closed

Description

Environment

Any environment with vite and latest nuxt version, see default sandbox repro

Reproduction

https://codesandbox.io/p/sandbox/damp-cache-4fvnwg?file=%2Fapp.vue%3A4%2C1

Describe the bug

Possible treeshaking issue?

If you are importing a type and use an enum value that has a conflicting name within a component, the export of the type seems to be broken.

<template>
  <div>
   {{TestEnum.**Test**}}
  </div>
</template>
import {**Test**, TestEnum} from 'test.ts';

defineProps<{
  test: Test[]
}>();

Given error:

The requested module '/_nuxt/test.ts' does not provide an export named 'Test'

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions