安装完 filemanager-webpack-plugin 插件 遇坑@TOC
vue项目启动报错 filemanager-webpack-plugin坑
if (isGlob) archive.glob(command.source, globOptions);else if (sStats.isFile()) archive.file(command.source, { name: path$1.basename(command.so
urce) });else if (sStats.isDirectory()) archive.glob(’**/*’
TypeError: Cannot read property ‘isFile’ of undefined

报错原因: 是因为 webpack.base.conf.js 里 new FileManagerPlugin 这设置了打包路径文件 我的是/dist/ 项目里没有的话 就报错了

解决方法:手动添加这个文件 重启项目 解决问题

本文详细介绍了在使用filemanager-webpack-plugin插件时遇到的TypeError错误:Cannot read property ‘isFile’ of undefined。错误原因是webpack配置中指定的打包路径在项目中不存在。通过手动创建该路径并重启项目,可以有效解决此问题。

被折叠的 条评论
为什么被折叠?



