-
Notifications
You must be signed in to change notification settings - Fork 73
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
resolveAsset interface via new svg-jar service #189
base: master
Are you sure you want to change the base?
resolveAsset interface via new svg-jar service #189
Conversation
…lock in to a particular addon
maybe the guard vs fastboot broke embroider? 🤔 |
The ultimate intention of this PR is to give more flexibility and enable proper documentation of usage |
Removed any dependency to resolves addons with this interface approach, I think this might be the best approach, and document how you could integrate any of these solutions... |
I updated the ember-try for embroider scenarios, but I honestly don't think this PR should be stopped by the current state of embroider, what I mean is that One way to get the tests green is to just literally remove the usage of hbs strategy for tests and/or somehow scope them behind a non-embroider scenarios |
This is going to take a little while to review. |
@jherdman I can split this PR, leave all of the embroider part out of it, the important thing is the service and the interface, and we would need to state that this strategy currently doesn't work for embroider. |
Let's split this PR in two as you suggested. I'm not familiar with Embroider so it'll take a while to get up to speed on that aspect of this fix. |
In order to avoid locked in to a particular addon for resolving assets, let consumers choose how they resolve assets i.e.
ember-cli-resolve-asset
orember-cli-ifa
for the hbs strategy the host app must implement/services/svg-jar
'sresolveAsset
method, this PR also guards FastBoot usage, honestly because I don't really understand how dynamic imports work in node and ember-cli-fastbootExample using
ember-cli-ifa
Example using
ember-cli-resolve-asset
Example without any addon,
this could potentially be the default one
and avoid having to declare the service altogether