From 37989a00c36a6147852798f583b65a5488cc5f86 Mon Sep 17 00:00:00 2001 From: Ash <70372500+ashscodes@users.noreply.github.com> Date: Fri, 11 Sep 2020 14:19:11 +0100 Subject: [PATCH] fix(v2): Correctly resolve sw.js path on windows (#3436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(v2): Correctly resolve sw.js path on windows * Just fixing the icons too Co-authored-by: Sébastien Lorber --- packages/docusaurus-plugin-pwa/src/index.js | 2 +- website/docusaurus.config.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/docusaurus-plugin-pwa/src/index.js b/packages/docusaurus-plugin-pwa/src/index.js index 98fd89a0e720..2b9f010617bc 100644 --- a/packages/docusaurus-plugin-pwa/src/index.js +++ b/packages/docusaurus-plugin-pwa/src/index.js @@ -73,7 +73,7 @@ function plugin(context, options) { plugins: [ new webpack.EnvironmentPlugin({ PWA_DEBUG: debug, - PWA_SERVICE_WORKER_URL: path.resolve( + PWA_SERVICE_WORKER_URL: path.posix.resolve( `${config.output.publicPath || '/'}`, 'sw.js', ), diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index ee5891776d65..5ecc55d36ac9 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -113,12 +113,12 @@ module.exports = { { tagName: 'link', rel: 'icon', - href: '/img/docusaurus.png', + href: 'img/docusaurus.png', }, { tagName: 'link', rel: 'manifest', - href: '/manifest.json', + href: 'manifest.json', }, { tagName: 'meta', @@ -138,18 +138,18 @@ module.exports = { { tagName: 'link', rel: 'apple-touch-icon', - href: '/img/docusaurus.png', + href: 'img/docusaurus.png', }, { tagName: 'link', rel: 'mask-icon', - href: '/img/docusaurus.svg', + href: 'img/docusaurus.svg', color: 'rgb(62, 204, 94)', }, { tagName: 'meta', name: 'msapplication-TileImage', - content: '/img/docusaurus.png', + content: 'img/docusaurus.png', }, { tagName: 'meta',