Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward slash removed in URL protocol for public path output, 'http:// to http:/' #47

Closed
jayryemure opened this issue Jun 18, 2019 · 4 comments

Comments

@jayryemure
Copy link

One of the forward slashes in the URL protocol seems to be removed from the outputted public path. http://[foo] to http:/[foo]

Ex:

    plugins: [,
        new HtmlWebpackPlugin({ template: 'index.html' }),
        new HtmlWebpackTagsPlugin({
            publicPath: 'https://www.foo.com',
            tags: [{ path: 'content/css', glob: '*.css', globPath: buildDir + '/content/css'}]
        })
    ]

Actual Result:

<link href="https:/www.foo.com/content/css/main.min.2976747713ab1fa371cde6441e3cfdef.css" rel="stylesheet"></head>

(https:/)

Expected Result:

<link href="https://www.foo.com/content/css/main.min.2976747713ab1fa371cde6441e3cfdef.css" rel="stylesheet"></head>

(https://)

Env:

webpack@4.33.O
html-webpack-plugin@3.2.O
html-webpack-tags-plugin@2.0.12

Microsoft Windows 10 Pro 10.0.15063 Build 15063
@jharris4
Copy link
Owner

Interesting, I hadn't tried using a full domain in the publicPath before. Is there any reason you're configuring it that way instead of just using / ?

@jharris4
Copy link
Owner

I just added a unit test for this case, and it is failing even on Mac. I'll look and see if I can fix it and get back to you.

@jharris4
Copy link
Owner

jharris4 commented Jun 18, 2019

Thanks for bringing this to my attention! I've fixed the bug and released the fix in version 1.0.13.

Please confirm if it's now fixed for you and we can close this issue.

@jayryemure
Copy link
Author

@jharris4 I've confirmed that it works for me on 1.0.13, thanks for the fix.

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

No branches or pull requests

2 participants