Closed
Description
Vue version
3.5.17
Link to minimal reproduction
Steps to reproduce
when i use props type Function, build will cause a error
const props=defineProps({
testFunction:Function // will build cause [vite:build-import-analysis] Maximum call stack size exceeded
})
when i give default value, will be ok
const props=defineProps({
testFunction: {
type: Function,
default: ()=>{}
}
})
npm run build
will cause error
x Build failed in 1m 8s
error during build:
[vite:build-import-analysis] Maximum call stack size exceeded
It made me investigate for a long time,can vue team give some advice to avoid this problem?
这个问题让我排查了很久,请问vue团队有什么好的解决方案,避免这个错误吗?
What is expected?
Function with no default value, build success
函数类型的参数无默认值,也能打包成功
What is actually happening?
Function with no default value, build failed
函数类型的参数无默认值,打包失败
System Info
Any additional comments?
No response