Open WormGirl opened 1 year ago
兄弟,你这个依赖安装不成功啊,确定 package.json 里面没有包含私有仓库的包
兄弟,你这个依赖安装不成功啊,确定 package.json 里面没有包含私有仓库的包
抱歉,是有几个私有的忘了删了,更新了,你重新拉下
兄弟,我这边没问题,你要么删除掉 lock 文件再安装试试?
兄弟,我这边没问题,你要么删除掉 lock 文件再安装试试?
兄弟,我这边没问题,你要么删除掉 lock 文件再安装试试?
兄弟,我上次就是删掉lock文件重装的
我打印的也是1 2 ,你加个debugger看看 ,很离谱的,运行时是3,2
const a = 3
function test(a: Number, b: Number) {
// a的值应该是1才对 实际变成了3 有点离谱
// eslint-disable-next-line no-debugger, no-restricted-syntax
debugger
console.log(a, b)
}
这个应该是 sourcemap 生成或者是 chrome 的问题:
你 debugger 源代码,函数 a 变量实则成为了 a2,所以会指向上面的 a,你自己打印 a2,还是 1,我觉得这个不用过多纠结
但是我删掉这个插件debugger就正常了 这是咋回事
感觉还是和这个插件有点关系
你把vite.config.ts里unplugin-vue-components/vite相关的删掉看下
重新验证了 就是debugger的时候不对 实际运行结果符合预期。。。可以的话还是麻烦看下啥原因 debugger不对也影响开发
提交 pr 了,是 sourceMap 精细度不够,等通过就好了
Describe the bug
When the global variable and function definition parameter have the same name, the function parameter will be overwritten by the global variable. After troubleshooting, it is caused by the unplugin vue components plugin. Removing this plugin is normal
Reproduction
https://github.com/WormGirl/bug-report-unplugin-vue-components
System Info
Used Package Manager
pnpm
Validations