Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Changing exports in files tracked by unimport crashes dev server in certain cases #33468

@cernymatej

Description

@cernymatej

Environment

  • Operating System: Darwin
  • Node Version: v22.14.0
  • Nuxt Version: 4.1.3
  • CLI Version: 3.29.3
  • Nitro Version: 2.12.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: compatibilityDate, devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-octwj7fv?file=app%2Fapp.vue,app%2Fcomposables%2Fuse-key.ts

Describe the bug

Let's use an auto-imported composable as an example.

export default function () {
  return 'use-key-default'
}

if we change it to a named export while the dev server is running

export function useKey() {
  return 'use-key-named'
}

the server crashes with the following error message

Image

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions