appcache-webpack-plugin icon indicating copy to clipboard operation
appcache-webpack-plugin copied to clipboard

Use path.join instead of string concatenation

Open davidblurton opened this issue 9 years ago • 1 comments

Fixes two bugs.

  1. If public path doesn't end with a slash
  2. If asset path starts with . or ../

davidblurton avatar Aug 10 '16 01:08 davidblurton

Firstly, sorry for not responding to this sooner! 😞

Secondly, please take a look at #10, and (hopefully) have a chuckle at how this PR is the inverse of that one 😝

Unfortunately, I can't pull this in because it will revert the fix for the Windows use case that #10 addressed. I'd like to have a solution here that solves for both that use case and the scenarios you're addressing here. I guess we need something that more-or-less implements joining and normalizing for urls (explicitly using '/' as a separator instead of the OS-specific file path separator, as path.join does).

Thanks for taking the time to open this, and i hope my slow response and subsequent rejection letter won't dissuade you from opening another PR, if you feel like taking a crack at solving for these use cases in a cross-platform way.

In the mean time, i'll leave this open as a reminder that we should do something about this.

lettertwo avatar Aug 18 '16 22:08 lettertwo