mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
fix icons in manifest not being found
This commit is contained in:
parent
155cd4c9bd
commit
91e69a2bd0
@ -32,7 +32,10 @@ module.exports = function injectWebManifest(manifestFile) {
|
||||
name: path.basename(iconFileName),
|
||||
source: imgData
|
||||
});
|
||||
icon.src = this.getFileName(ref);
|
||||
// we take the basename as getFileName gives the filename
|
||||
// relative to the output dir, but the manifest is an asset
|
||||
// just like they icon, so we assume they end up in the same dir
|
||||
icon.src = path.basename(this.getFileName(ref));
|
||||
}
|
||||
const outputName = path.basename(absoluteManifestFile);
|
||||
const manifestRef = this.emitFile({
|
||||
|
@ -47,6 +47,8 @@ export default {
|
||||
// }, "hydrogen-legacy", [
|
||||
// './legacy-polyfill',
|
||||
// ]),
|
||||
// important this comes before service worker
|
||||
// otherwise the manifest and the icons it refers to won't be cached
|
||||
injectWebManifest("assets/manifest.json"),
|
||||
injectServiceWorker("sw.js"),
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user