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

Template Only Strategy Might be Broken #191

Closed
jherdman opened this issue Mar 28, 2021 · 4 comments
Closed

Template Only Strategy Might be Broken #191

jherdman opened this issue Mar 28, 2021 · 4 comments
Labels

Comments

@jherdman
Copy link
Collaborator

jherdman commented Mar 28, 2021

🐞 Bug Report

Describe the bug

Given:

<Svg @name="icon" />

Where exists:

public/icon.svg
  1. We're missing the ember-cli-resolve-asset package
  2. After installing this package:
Error: ember-cli-resolve-asset: Could not find 'ember-svg-jar/components/icon.js' in the asset map.
     at getAssetPath (http://localhost:7357/assets/vendor-f347f06b9a927d124d62a02d2ec78022.js:66965:13)
     at resolveAsset (http://localhost:7357/assets/vendor-f347f06b9a927d124d62a02d2ec78022.js:66986:12)
     at async loadSvg (http://localhost:7357/assets/vendor-f347f06b9a927d124d62a02d2ec78022.js:68063:23)
     at async Svg.updateSvg (http://localhost:7357/assets/vendor-f347f06b9a927d124d62a02d2ec78022.js:68088:30)
--

Reproduce the bug

See #190

Expected behavior

It embeds the correct SVG.

@jherdman jherdman added the bug label Mar 28, 2021
@jherdman
Copy link
Collaborator Author

@betocantu93 I may have merged the template-only strategy prematurely. Would you be able to help me with the above? I've pushed a branch with the reproduction.

@betocantu93
Copy link
Contributor

betocantu93 commented Mar 28, 2021

There's two separate issues here...

  1. I think the strategy prefixes the component names and it's also configurable...
<Svg @name="svg/icon" />
  1. resolveAsset interface via new svg-jar service #189 removes any hard coded dependency to asset resolvers, so with that there's no need for ember-cli-resolve-asset

@jherdman
Copy link
Collaborator Author

@betocantu93 sorry for being so slow on this, it's been busy as of late. I'm going to try and get back up to speed on this issue ASAP.

@betocantu93
Copy link
Contributor

@jherdman no worries! let me know how I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants