import.meta.globEager已弃用
在开发Vue.js项目使用electron时,遇到了因import.meta.globEager已弃用导致的build错误。经过搜索解决方案,发现需要将原始代码中的import.meta.globEager替换为import.meta.glob,并设置{ eager: true }。修改后的代码使用glob方法加载模块,并通过Object.values遍历模块,将模块添加到routeModuleList中。
在开发Vue.js项目使用electron时,遇到了因import.meta.globEager已弃用导致的build错误。经过搜索解决方案,发现需要将原始代码中的import.meta.globEager替换为import.meta.glob,并设置{ eager: true }。修改后的代码使用glob方法加载模块,并通过Object.values遍历模块,将模块添加到routeModuleList中。