deecewan / webapp-manifest-plugin

Create a web application manifest for your PWA based on your webpack build.
5 stars 6 forks source link

Remove slash after publicPath. #1

Closed leMaik closed 7 years ago

leMaik commented 7 years ago

This removes the slash between the publicPath and manifest.json.

This plugin is really awesome and we use it for almost all our webapps, but unfortunately it doesn't behave like all other plugins. If the publicPath is set to / (which it needs to be so that any other automatically generated link works), this slash causes the link to the manifest to start with //, causing the manifest file not to be found.

deecewan commented 7 years ago

Hey! Thanks for the contribution.

I didn't get a notification for this, sorry, so am only just seeing this.

Any chance you can verify that a slash is present, and only skip if it is present?

i.e.

if publicPath is /, don't append the slash. if the last character is not a /, append it.

Thanks again for the contribution 👍

leMaik commented 7 years ago

Thanks for your feedback! I'll update my PR in a moment. :+1:

leMaik commented 7 years ago

@deecewan Would you mind releasing a new version so that I can stop using our "build and just push everything to GitHub to make our project work" branch? :smile:

deecewan commented 7 years ago

@leMaik there should be a new version on NPM now.