Skip to content

Fix possible double slashs when dynamicPublicPath - #383

Open
mathieutu wants to merge 1 commit into
webpack:masterfrom
mathieutu:patch-1
Open

Fix possible double slashs when dynamicPublicPath#383
mathieutu wants to merge 1 commit into
webpack:masterfrom
mathieutu:patch-1

Conversation

@mathieutu

Copy link
Copy Markdown

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Hi,
Thanks for this package!

I'm in a situation where a tool I can't control set my publicPath from config, and add a / to it. In fact webpack recommends to do that:

The value of the option is prefixed to every URL created by the runtime or loaders. Because of this the value of this option ends with / in most cases.

However the HMR path also starts with a /, and all the default paths and example of this package!

With theses both slashes, when in case of dynamicPublicPath: true, we end to a publicPath//path path.

This little PR just fixes that by replacing all // with / in the paths concatenation.

Thanks,
Mathieu.

@jsf-clabot

jsf-clabot commented May 5, 2020

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@mathieutu

Copy link
Copy Markdown
Author

Circle fails for a reason which seems not related to this PR.

@alexander-akait

Copy link
Copy Markdown
Member

@mathieutu Sorry for delay, can you add test case?

@mathieutu

mathieutu commented Nov 9, 2022

Copy link
Copy Markdown
Author

Sorry, but it has been more than two years, and I'm not using the project anymore.

I'll try to take a look, but if someone wants to tackle it, feel free!

@bjohansebas

Copy link
Copy Markdown
Member

webpack-hot-middleware is being migrated into webpack-dev-middleware — see webpack/webpack-dev-middleware#2322.

This is handled there by webpack/webpack-dev-middleware#2348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants