"PUBLIC_URL" no parse
URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
Same problem here (1.5.0). After wrapping webpack config with smp.wrap as described in Usage, %PUBLIC_URL% in index.html is not replaced as it should.
Current workaround is to make it conditional in build.js,
if (process.env.MEASURE_BUILD) {
...wrap...
}
and don't use the measured builds for anything (except measuring of course).
All environment variables are not parsed in template html is my minimal GitHub repository to show this https://github.com/hellokidder/webpack-bundle-analyzer-test
Same issue here with %PUBLIC_URL%. I'd like to use the SMP wrapper in production to remove the CRA default "IgnorePlugin" for the popular library Method.js that has huge locale files because I don't use it.
Is there any solution to get both of them working ? Maybe removing the 2 plugins before wrap and adding them manually after wrap ?
shouldInlineRuntimeChunk &&
new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="icon" href="%PUBLIC_URL%/favicon.ico">
// It will be an empty string unless you specify "homepage"
// in `package.json`, in which case it will be the pathname of that URL.
new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),```