模板配置复制 - '复制'在类型中不存在StencilConfig'
我如何在模板配置中使用'复制',我正在尝试使所有 i18n.json 在汇编后可用。
export const config: Config = {
namespace: 'components',
plugins: [
...
],
outputTargets: [
...
],
copy: [
{
src: "**/*.i18n.*.json",
dest: "i18n",
warn: true
}
],
};
错误:
复制:{src:string; dest:string;警告:布尔人; } []; }'不是 可分配给类型的“ concenconfig”
How can I use 'copy' in stencil config, I am trying to make all i18n.json be available after compilation.
export const config: Config = {
namespace: 'components',
plugins: [
...
],
outputTargets: [
...
],
copy: [
{
src: "**/*.i18n.*.json",
dest: "i18n",
warn: true
}
],
};
Error:
copy: { src: string; dest: string; warn: boolean; }[]; }' is not
assignable to type 'StencilConfig'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
复制任务已移至输出目标中(我认为在版本1中)。因此,只需将复制任务移至输出目标之一。
Here are the docs: https://stenciljs.com/docs /copy任务#复制任务 - for-of-of-of-of-tot-targets
Copy tasks have been moved into the output targets (I think in version 1). So simply move the copy task into one (or more) of your output targets.
Here are the docs: https://stenciljs.com/docs/copy-tasks#copy-tasks-for-output-targets