You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@LukeTowers yeah I have the same issue occurring. It's due to the Asset Maker PR that was merged recently, and the fact that now all assets are using a URL. I was meaning to ask Jack or yourself what the change was for.
@bennothommo it's to support having your assets published on a CDN, specifically on Laravel Vapor it was an issue where any assets added via the AssetMaker trait weren't respecting the asset_url config value and thus weren't loading. We should just be able to add support for the app.asset_url config value to the asset decompiler and it should just work.
@LukeTowers ok, gotcha, however, is that needed for assets that are included in the core? I can see the case for plugins, where they may be externally stored, but the ones in core that actually are candidates for decompilation should still be loaded locally? Unless you are moving those externally as well?
When using a CDN as a part of your deployed Winter instance the idea is for all assets to be served through it, so loading any assets "locally" would be a bit pointless.
I imagine that the decompiler should be able to just strip off the asset URL before attempting to decompile an asset, no?
That should be fine, the asset URL helper should only be adding to assets that are available locally anyways, and you certainly wouldn't actually be using the asset decompiler in an environment like Vapor where the assets might not even be present on the server at all.
Activity
[-]Error with decompiled assets[/-][+]Error with decompiled assets in 1.2[/+]bennothommo commentedon May 21, 2022
@LukeTowers yeah I have the same issue occurring. It's due to the Asset Maker PR that was merged recently, and the fact that now all assets are using a URL. I was meaning to ask Jack or yourself what the change was for.
LukeTowers commentedon May 22, 2022
@bennothommo it's to support having your assets published on a CDN, specifically on Laravel Vapor it was an issue where any assets added via the AssetMaker trait weren't respecting the asset_url config value and thus weren't loading. We should just be able to add support for the
app.asset_urlconfig value to the asset decompiler and it should just work.bennothommo commentedon May 22, 2022
@LukeTowers ok, gotcha, however, is that needed for assets that are included in the core? I can see the case for plugins, where they may be externally stored, but the ones in core that actually are candidates for decompilation should still be loaded locally? Unless you are moving those externally as well?
LukeTowers commentedon May 22, 2022
When using a CDN as a part of your deployed Winter instance the idea is for all assets to be served through it, so loading any assets "locally" would be a bit pointless.
I imagine that the decompiler should be able to just strip off the asset URL before attempting to decompile an asset, no?
bennothommo commentedon May 23, 2022
Sure, we can do that. If the assets are not available locally though, it will fail.
LukeTowers commentedon May 23, 2022
That should be fine, the asset URL helper should only be adding to assets that are available locally anyways, and you certainly wouldn't actually be using the asset decompiler in an environment like Vapor where the assets might not even be present on the server at all.
Allow decompilation of local assets that match local URL
bennothommo commentedon May 25, 2022
Fixed by 805b95b.
Allow decompilation of local assets that match local URL