ionic-team / ionic-team/ionicons
ionic 4 - prefix CDN domain before svg path of ionic components
- Dominant language
- TypeScript
- Stars
- 18.2k
- Forks
- 2.1k
- PR merge metrics
- No merged PRs in 30d
Description
I am serving my application's "index.html" file from a different domain and my ionic application is hosted on CDN domain.
**Build Command**
`ng build --prod --aot --build-optimizer --output-hashing none --deploy-url https://myappv1.mycdn.in/`.
Here --deploy-url is my CDN domain.
**Current behavior:**
When I am using `` it's loading *.svg file dynamically. Whom path is related to "base-href" tag or hosted domain.
**Expected behavior:**
I want to prefix CDN domain before all *.svg file which is dynamically generating by ionic components so *.svg path will not be pointed to the hosted domain.
**Problem Statement**
Not getting the option to prefix CDN domain before *.svg file which is dynamically getting loaded by ionic components.
I am able to prefix the CDN domain before "assets" folder files but not able to do the same with ionic components related svg file. Because I don't know the entry point of the same.
**Proposed/Expected solution**
All ionic components lazy loaded files should have prefixed `--deploy-url` path. For example if my `--deploy-url https://myappv1.mycdn.in/` is while building my app. Svg file path of ionic components should be like `https://myappv1.mycdn.in/svg/md-arrow-back.svg`.
**Ionic Info**
Ionic CLI: 4.10.3
Angular CLI: 7.3.3
Node: 10.15.1
Npm: 6.8.0
OS: darwin x64 (macOs Mojave, Version: 10.14.1)
Contributor guide
Assessment
This issue has not been assessed yet.