Missing "./types" specifier in "vue" package, how to use withDefaults in Vue2.7.15 with ts setup
52javascript opened this issue · 1 comments
52javascript commented
Version
2.7.15
Reproduction link
Steps to reproduce
import { withDefaults } from 'vue/types'
interface Props {
layout: string
}
const props = withDefaults(defineProps(), {
layout: 'total, prev, pager, next, sizes, jumper'
})
What is expected?
i want to set props default value
What is actually happening?
8:34:23 PM [vite] Internal server error: Missing "./types" specifier in "vue" package
Plugin: vite:import-analysis
yyx990803 commented
withDefaults is a macro. There is no need to import it.