Open tacman opened 8 months ago
I started playing around with this, and wow, what a config file! In fact, I think I found a Symfony bug while trying to understand it.
It's probably not common, and it might not even be possible, but do you think there's any value in splitting up the manifest and service worker configuration?
Regardless, this bundle doesn't have a recipe yet, if it did, what would be a minimal yaml file to create? Most of the defaults work fine, but obviously name, short_name and description need to change. I also had an idea about an icons and screenshots directory, rather than listing each of them.
Description
I'd like to quickly create the config/packages/pwa.yaml command, as the first thing I do when adding pwa capabilities via this awesome bundle is copy from one of my existing projects and tweak the name and description.
I imagine that pwa.yaml is going to grow in complexity, the more programmers can put in the YAML, the less javascript they have to write in the service worker. In particular, configuring the caching strategies is tricky in javascript, which is why I love that this bundle is doing all the hard work.
I was thinking about writing a pwa-helper-bundle where I could play around with ideas like this and the route attribute parsing. Eventually the "extra" would move into the core bundle (this one) as you see fit.
extra could also include some twig components, like an install button and maybe some debugging. Once it works, we can move it to here.
Example