【前端开发】Webpack electron打包--ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema
ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema. - options[0] misses the property 'patterns'. Should be: [non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item) - options[1] misses the property 'patterns'. Should be: [non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item) vue.js npm
module.exports = { plugins: [ new CopyWebpackPlugin({ patterns: [ { from: Path.resolve('./modules/web/static/'), to: './assets' }, { from: Path.resolve('./modules/web/static/favicon.ico'), to: './' }, ] }), new TsChecker({ typescript: { configFile: Path.resolve('tsconfig.json') } }),
//cesium相关资源目录需要拷贝到系统目录下面 // new CopyWebpackPlugin([{ // from: path.join(cesiumSourcePath, 'Workers'), // to: path.join(config.output.path, cesiumRunPath, 'Workers') // }]), // new CopyWebpackPlugin([{ // from: path.join(cesiumSourcePath, 'Assets'), // to: path.join(config.output.path, cesiumRunPath, 'Assets') // }]), // new CopyWebpackPlugin([{ // from: path.join(cesiumSourcePath, 'ThirdParty'), // to: path.join(config.output.path, cesiumRunPath, 'ThirdParty') // }]), // new CopyWebpackPlugin([{ // from: path.join(cesiumSourcePath, 'Widgets'), // to: path.join(config.output.path, cesiumRunPath, 'Widgets') // }])
new CopyWebpackPlugin({ patterns: [{ from: path.join(cesiumSourcePath, 'Workers'), to: path.join(config.output.path, cesiumRunPath, 'Workers') }, { from: path.join(cesiumSourcePath, 'Assets'), to: path.join(config.output.path, cesiumRunPath, 'Assets') }, { from: path.join(cesiumSourcePath, 'ThirdParty'), to: path.join(config.output.path, cesiumRunPath, 'ThirdParty') }, { from: path.join(cesiumSourcePath, 'Widgets'), to: path.join(config.output.path, cesiumRunPath, 'Widgets') } ] }),
博客地址: http://www.cnblogs.com/defineconst/
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。
博客版权: 本文以学习、研究和分享为主,欢迎转载和各类爬虫,但必须在文章页面明显位置给出原文链接。 如果文中有不妥或者错误的地方还望高手的您指出,以免误人子弟。如果您有更好的建议,不如留言一起讨论,共同进步! 再次感谢您耐心的读完本篇文章。