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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
@themsaid I'm sorry, but I'm joining the line of people asking for an explanation. webmanifest files are necessary for PWA's, so I think filtering those files is not right. But if there is a good explanation I'm fine with that. The only problem is how can an app running on Vapor publish these files? Creating a route and returning the content is an option off course, but that bypasses CDN, caching and asset versioning. Or do you know other ways?
The reason will be displayed to describe this comment to others. Learn more.
At this time would be a breaking change making changes on that list - because some customers have now created Laravel Routes that serve those files. In the future, we plan to provide a clean and built-in solution for this kind of files/situations.
For now, the option is to create a route that serves the files you need:
Route::get('/your-file-name.extension', function () {
$contents = 'content' ; // Get the file content from the public path or from S3.return$contents;
});
We are going to keep your proposal in mind for a future major version.
The reason will be displayed to describe this comment to others. Learn more.
If anyone needs to override this in the meantime, and are deploying with a Github Action or similar, then adding the following after the "Require Vapor CLI" step in your workflow will comment out the lines:
- name: Patch Vapor CLIrun: | sed -i "/->notName('browserconfig\.xml')/s/^/\/\//" $(composer config home)/vendor/laravel/vapor-cli/src/AssetFiles.php sed -i "/->notName('.*\.webmanifest')/s/^/\/\//" $(composer config home)/vendor/laravel/vapor-cli/src/AssetFiles.php
The reason will be displayed to describe this comment to others. Learn more.
This was not easy to find. I created a site.webmanifest manually and added it to the public folder like described in the Documentation:
During deployment, Vapor will automatically extract all of the assets in your Laravel project's public directory and upload them to S3. In addition, Vapor will create a AWS CloudFront (CDN) distribution to distribute these assets efficiently around the world.
I would at least ask for documentation if you do not plan to change it
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the reason the exclude the manifest from the asset files?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@themsaid I've the same question. How could/should I implement the webmanifest file?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@themsaid is info here?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@themsaid I'm sorry, but I'm joining the line of people asking for an explanation.
webmanifest
files are necessary for PWA's, so I think filtering those files is not right. But if there is a good explanation I'm fine with that. The only problem is how can an app running on Vapor publish these files? Creating a route and returning the content is an option off course, but that bypasses CDN, caching and asset versioning. Or do you know other ways?30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nunomaduro ?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@themsaid @nunomaduro ping?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this time would be a breaking change making changes on that list - because some customers have now created Laravel Routes that serve those files. In the future, we plan to provide a clean and built-in solution for this kind of files/situations.
For now, the option is to create a route that serves the files you need:
We are going to keep your proposal in mind for a future major version.
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nunomaduro thank you for the update!
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pass throw the same issue and my solution was to use aws cli to upload the file directly in deploy command in vapor.yml.
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nunomaduro Any update on this one?
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anyone needs to override this in the meantime, and are deploying with a Github Action or similar, then adding the following after the "Require Vapor CLI" step in your workflow will comment out the lines:
30f55ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not easy to find. I created a site.webmanifest manually and added it to the public folder like described in the Documentation:
I would at least ask for documentation if you do not plan to change it