add base to manifest path, just for completeness

This commit is contained in:
Bruno Windels 2021-12-08 18:29:07 +01:00
parent 4c2c99fc07
commit fb8149b6cf
1 changed files with 3 additions and 1 deletions

View File

@ -3,12 +3,14 @@ const path = require('path');
module.exports = function injectWebManifest(manifestFile) {
let root;
let base;
let manifestHref;
return {
name: "hydrogen:injectWebManifest",
apply: "build",
configResolved: config => {
root = config.root;
base = config.base;
},
transformIndexHtml: {
transform(html) {
@ -43,7 +45,7 @@ module.exports = function injectWebManifest(manifestFile) {
name: outputName,
source: JSON.stringify(manifest)
});
manifestHref = this.getFileName(manifestRef);
manifestHref = base + this.getFileName(manifestRef);
}
};
}