项目npm run dev报错 if (isGlob) archive.glob(command.source, globOptions) else if (sStats.isFile())

安装完 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
项目npm run dev报错 if (isGlob) archive.glob(command.source, globOptions) else if (sStats.isFile())_第1张图片
报错原因: 是因为 webpack.base.conf.js 里 new FileManagerPlugin 这设置了打包路径文件 我的是/dist/ 项目里没有的话 就报错了
项目npm run dev报错 if (isGlob) archive.glob(command.source, globOptions) else if (sStats.isFile())_第2张图片

解决方法:手动添加这个文件 重启项目 解决问题
项目npm run dev报错 if (isGlob) archive.glob(command.source, globOptions) else if (sStats.isFile())_第3张图片

你可能感兴趣的:(vue.js)