NuxtN
Nuxt2mo ago
5 replies
Norman

Unable to resolve default imports in template

Since this morning default-imports can not me resolved by typescript when using them in the template.

Example:
// test.ts
export const namedExport = true;

export default 'default export working';


<template>
<div>
  <!-- All good -->
  {{ namedExport }} 

  <!-- Typescript error `Property 'defaultExport' does not exist on type '...'` -->
  {{ defaultExport }} 
</div>
</template>

<script lang="ts" setup>
import { namedExport } from "./utils/test";
import defaultExport from "./utils/test";
</script>


Reproduction:
- https://stackblitz.com/edit/github-kjnovknv?file=app%2Fapp.vue (Minimal starter)
- Run npx nuxi typecheck
Screenshot_2025-12-08_at_14.19.40.png
StackBlitzNorman Feiß
Minimal reproduction of the bug
Broken default imports in typecheck - StackBlitz
Was this page helpful?