forked from mystiq/hydrogen-web
add base to manifest path, just for completeness
This commit is contained in:
parent
4c2c99fc07
commit
fb8149b6cf
1 changed files with 3 additions and 1 deletions
|
@ -3,12 +3,14 @@ const path = require('path');
|
||||||
|
|
||||||
module.exports = function injectWebManifest(manifestFile) {
|
module.exports = function injectWebManifest(manifestFile) {
|
||||||
let root;
|
let root;
|
||||||
|
let base;
|
||||||
let manifestHref;
|
let manifestHref;
|
||||||
return {
|
return {
|
||||||
name: "hydrogen:injectWebManifest",
|
name: "hydrogen:injectWebManifest",
|
||||||
apply: "build",
|
apply: "build",
|
||||||
configResolved: config => {
|
configResolved: config => {
|
||||||
root = config.root;
|
root = config.root;
|
||||||
|
base = config.base;
|
||||||
},
|
},
|
||||||
transformIndexHtml: {
|
transformIndexHtml: {
|
||||||
transform(html) {
|
transform(html) {
|
||||||
|
@ -43,7 +45,7 @@ module.exports = function injectWebManifest(manifestFile) {
|
||||||
name: outputName,
|
name: outputName,
|
||||||
source: JSON.stringify(manifest)
|
source: JSON.stringify(manifest)
|
||||||
});
|
});
|
||||||
manifestHref = this.getFileName(manifestRef);
|
manifestHref = base + this.getFileName(manifestRef);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue