ionic-team / ionic-team/ionicons

How to set location of icons svgs in deployment? (resourcesUrl)

未关闭
#665 4 条评论 7 个 reaction 已指派 0 人 在 GitHub 查看
help wanted type: bug
主要语言
TypeScript
星标
18.2k
派生
2.1k
PR 合并指标
30 天内没有已合并 PR

描述

I am using ionicons with Ionic 4 and angular. I would like to change the deployment to put the ionicons svg files into a different directory than `svg/`. I know how to do this in angular.json but I can't figure out how to tell ionicons about the new location.

There is a resourcesUrl property inside the ion-icon component that seems to figure in [1] if I could set it. I don't understand how to set it through so all components get the setting.

Does anyone know how to override the resourcesUrl path so I can point to a different location?

1: https://github.com/ionic-team/ionicons/blob/master/src/components/icon/icon.tsx#L181

贡献指南

打开贡献指南

调研方向

Start with the resourcesUrl property in src/components/icon/icon.tsx and compare it with the asset configuration in angular.json. Trace how the icon component receives or determines this path, then establish how a deployment can set a shared location for all components.

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend, web-dev
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。