arthurbergmz / webpack-pwa-manifest

Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
MIT License
514 stars 93 forks source link

publicPath different for manifest.json (same origin) and icons (CDN) #79

Closed olivierpascal closed 6 years ago

olivierpascal commented 6 years ago

Hi,

I would like to be able to set a different publicPath for manifest.json (ie. <link rel="manifest" href="/manifest.json" />) and icons (ie. "src": "https://my-cdn/icon_512x512.png").

Would you accept a PR?

doug-wade commented 6 years ago

Hi @olivierpascal, we would take a PR, though I'd be interested to hear about your plan first. I think taking a publicPath option in a single icon hash would be best, even though this has the drawback of being somewhat repetitive (but maybe that doesn't matter?).

olivierpascal commented 6 years ago

Hi @doug-wade, sorry for the long delay in my reply.

Your discussion about extending the icon support for v4.0.0 was inspiring. I quickly inspected the next branch and found that there still was a long way to go with it to get something working. It was simpler, quicker and more flexible for me to start a new plugin from scratch to fit my exact needs. I made a PoC the same day and published it in case it could help others.

https://github.com/olivierpascal/flexible-pwa-webpack-plugin

doug-wade commented 6 years ago

Given that you've chosen to implement this as a separate plugin, I'm going to close this issue. Should you choose to bring this feature into this plugin, which as I say would be welcome, please reopen or open a new issue.