[转]CopyPlugin Invalid Options options should be array ValidationError: CopyPlugin Invalid Options
这个错误是使用webpack的一个plugin出现的错误。
这个plugin是copy-webpack-plugin
我把文档的例子复制,然后就报了这个错误。
文档的例子:
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
plugins: [
new CopyPlugin({
patterns: [
{ from: "source", to: "dest" },
{ from: "other", to: "public" },
],
options: {
concurrency: 100,
},
}),
],
};
这个错误说的是这个CopyPlugin构造函数接收到的参数不合法,它需要传入一个array。
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template: "./public/index.html",
chunks: ["main"]
}),
new CopyPlugin([{
from: "./public/img",
to: "./img"
}]),
]
原文链接:CopyPlugin Invalid Options options should be array ValidationError: CopyPlugin Invalid Options
[转]CopyPlugin Invalid Options options should be array ValidationError: CopyPlugin Invalid Options的更多相关文章
- 抓取某网站信息时遇到的问题及解决 The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set
var response = httpClient.SendAsync(requestMessage).Result; content = response.Content.ReadAsStringA ...
- 报错:The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
今天重装eclipse和Tomcat,启动时候报标题错“The server cannot be started because one or more of the ports are invali ...
- [轻微]WEB服务器启用了OPTIONS方法/如何禁止DELETE,PUT,OPTIONS等协议访问应用程序/tomcat下禁用不安全的http方法
使用了360网站安全检测 查到有OPTIONS方法 百度了下 https://my.oschina.net/maliang0130/blog/338725 找到这个方法奈何http.conf 找不到无 ...
- invalid types 'int[int]' for array subscrip
定义重复 如 一个int r 与一个 r[i] 重复
- invalid types 'int[int]' for array subscript// EOF 输入多组数据//如何键盘输入EOF
数组维度搞错了 一次运行,要输入多组数据,直到读至输入文件末尾(EOF)为止 while(scanf("%d %d",&a, &b) != EOF) // 输入结束 ...
- The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
在eclipse里运行jsp文件最初迟迟没有反应,重启报了这个错误,tomcat的端口设置有问题.需要打开服务器设置一下端口号. 点击Servers,如果没有这一项,按照Window-Show Vie ...
- System Error Codes
很明显,以下的文字来自微软MSDN 链接http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx M ...
- Windows 错误代码
Error Messages for Windows http://www.gregorybraun.com/MSWINERR.ZIP Server 4.0 Error Messages Code ...
- TP model where条件丢失
最近我修复了一个bug,这个bug是用户能看到所有用户的数据,经过排查发现是where条件丢失,导致查询语句直接查了所有数据. 但是代码并没有问题,然后查到了 ThinkPHP/Library/Thi ...
- Vue源码思维导图------------Vue选项的合并之$options
本节将看下初始化中的$options: Vue.prototype._init = function (options?: Object) { const vm: Component = this / ...
随机推荐
- CSP模拟 小 trick 总结 (持续施工中)
虽然这篇博客来的有点晚,但还是写了,欢迎dalao补充( (很杂,建议先浏览目录) 1.分块.莫队有关: \(\color{brown}(1)一个真正的回滚莫队(感谢\ Qyun\ 的讲解):\) $ ...
- jenkins构建pytest持续集成环境时,遇到的一些问题及处理
前言: 构建的项目为pytest+appium+allure,在pycharm里面已将环境代码调试并测试完毕,放到jenkins里执行的一些问题整理 问题1.pycharm里可以正常运行代码,到了je ...
- 使用LayUI实现文件上传的一个误区
1.HTML 2.JS 3.后端处理(注意:参数 file) 这里传入的参数名只能是 file LayUI文件上传官方文档: https://www.layui.com/doc/modules/upl ...
- 12C RAC 故障分析 - ORA-17503: ksfdopn:2 Failed to open file +DATA/EIC1/PASSWORD/pwdeic1.256.957086685
一.故障描述 Oracle 12C PDBS(PDB NAME = WRYPC) 在note1节点上是MOUNTED状态,在note2节点上是READ WRITE状态.note1节点上启动该PDB长时 ...
- ROS入门21讲(3)
七.话题消息的定义和使用 目的:实现Publisher 与 Subscriber 之间的传输 1.自定义话题消息 如何自定义话题消息? ①完成数据接口的定义---定义msg文件 Person.msg ...
- WinDbg调试命令之线程操作
WinDbg的线程操作命令可以帮助开发人员诊断和解决多线程应用程序中的问题,常用的命令有以下这些. ~*e - 列出当前进程中的所有线程 这个命令会列出当前进程中的所有线程,包括它们的线程ID.状态. ...
- 强化学习训练过程中的过度拟合(overfitting)
相关: A.I. Learns to Drive From Scratch in Trackmania 本文讨论的是强化学习中的过度拟合问题,要知道强化学习中的过拟合和其他的监督.无监督学习的过拟合不 ...
- UIAbility组件生命周期
当用户打开.切换和返回到对应应用时,应用中的UIAbility实例会在其生命周期的不同状态之间转换.UIAbility类提供了一系列回调,通过这些回调可以知道当前UIAbility实例的某个状态发生改 ...
- c++11新增内容
记录一下c++11新特性方便以后回忆 1.nullptr (对标NULL) 2.auto ,decltype(根据表达式推断类型,表达式不执行) decltype(func()) sum = 5; / ...
- 4. jenkins的配置
Maven安装和配置 在Jenkins集成服务器上,我们需要安装Maven来编译和打包项目. 安装Maven 先上传Maven软件到192.168.66.101 tar -xzf apache-m ...