dojo / webpack-contrib

Plugins and loaders for webpack used with Dojo
Other
4 stars 19 forks source link

BTR does not elide localhost outside the mount point #327

Open msssk opened 3 years ago

msssk commented 3 years ago

Bug

https://github.com/dojo/webpack-contrib/blob/3641d4a8c5242ba13f6ad47bb210185b64c56690/src/build-time-render/BuildTimeRender.ts#L393 BTR elides localhost from URLs, but this process is not applied to the document head.

Code

const image = require('./image.jpg');

// in widget
return (
    <div>
        <head>
            <meta property="og:image" content={image} />
        </head>
    </div>
);

Expected behavior:

<meta property="og:image" content="image.jpg" />

Actual behavior:

<meta property="og:image" content="http://localhost:54327/image.jpg" />