From 8ef069a359441071b206ada8130af2e4c2216cef Mon Sep 17 00:00:00 2001 From: Edie Lemoine Date: Thu, 9 Mar 2023 14:21:15 +0100 Subject: [PATCH] fix: make dark mode load earlier to avoid white flash (#46) --- src/.vuepress/theme/index.ts | 2 ++ src/.vuepress/theme/templates/build.html | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/.vuepress/theme/templates/build.html diff --git a/src/.vuepress/theme/index.ts b/src/.vuepress/theme/index.ts index 303da2edb..e36caaee1 100644 --- a/src/.vuepress/theme/index.ts +++ b/src/.vuepress/theme/index.ts @@ -28,6 +28,8 @@ export const myParcelTheme = (options: MyPaThemeData): Theme => { return { name: '@myparcel/developer-portal', + templateBuild: path.resolve(__dirname, 'templates', 'build.html'), + layouts: { Layout: `${views}/layout/layout/Layout.vue`, // eslint-disable-next-line @typescript-eslint/no-magic-numbers diff --git a/src/.vuepress/theme/templates/build.html b/src/.vuepress/theme/templates/build.html new file mode 100644 index 000000000..a38057a35 --- /dev/null +++ b/src/.vuepress/theme/templates/build.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + +
+ + +