Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export setAssetPath #1372

Merged

Conversation

christian-bromann
Copy link
Member

Ionicons never exports setAssetPath prevents users from actually changing given path. Exporting it makes Stencil to keep this function as part of the bundled runtime. I tested the change by using this HTML:

<script type="module" src="/node_modules/ionicons/dist/ionicons/ionicons.esm.js"></script>
<script type="module">
    import { setAssetPath } from '/node_modules/ionicons/dist/ionicons/index.esm.js';
    setAssetPath('/I/got/changed');
</script>
<ion-icon name="heart"></ion-icon>

I was able to verify that:

  • I can import a setAssetPath method from ionicons
  • it impacts where the SVGs are getting loaded from

Note: I have also reported this as a bug in Stencil

fixes #1302

@liamdebeasi liamdebeasi changed the base branch from main to feature-7.4 May 1, 2024 18:09
@liamdebeasi liamdebeasi changed the base branch from feature-7.4 to main May 1, 2024 18:09
@christian-bromann christian-bromann changed the base branch from main to feature-7.4 May 1, 2024 18:45
@liamdebeasi liamdebeasi changed the title fix: export setAssetPath to give user a way to change that path feat: export setAssetPath May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: not clear how to use setAssetPath to load svg icons
2 participants