You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there some problem when call function util.resolvePublicPath with publicPath is undefined,
it doesn't return the relative path from the html template;
`function resolvePublicPath(compilation, filename) {
/* istanbul ignore else */
const publicPath =
typeof compilation.options.output.publicPath !== 'undefined'
? compilation.options.output.publicPath
: _path().default.relative(_path().default.dirname(filename), '.'); // TODO: How to test this? I haven't written this logic, unsure what it does
hi ,
is there some problem when call function util.resolvePublicPath with publicPath is undefined,
it doesn't return the relative path from the html template;
`function resolvePublicPath(compilation, filename) {
/* istanbul ignore else */
const publicPath =
typeof compilation.options.output.publicPath !== 'undefined'
? compilation.options.output.publicPath
: _path().default.relative(_path().default.dirname(filename), '.'); // TODO: How to test this? I haven't written this logic, unsure what it does
return ensureTrailingSlash(publicPath);
}`
change to
`function resolvePublicPath(compilation, filename, childCompilationOutputName) {
//Copied from html-webpack-plugin
var publicPath =
typeof compilation.options.output.publicPath !== 'undefined'
? compilation.options.output.publicPath
: _path().default.relative(_path().default.resolve(compilation.options.output.path, _path().default.dirname(childCompilationOutputName)), compilation.options.output.path)
.split(_path().default.sep).join('/');
return ensureTrailingSlash(publicPath);
}
`
will compile the correct relative path
childCompilationOutputName = htmlPluginData.outputName
The text was updated successfully, but these errors were encountered: