From 82e38ad38f45928aa90bd0e6920651d02c8fc216 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Mon, 21 Aug 2023 07:06:21 +0200 Subject: [PATCH] refactor: Update html build files --- .github/workflows/main_deploy.yaml | 6 +- web/index.html | 98 +++++++++--------------------- 2 files changed, 32 insertions(+), 72 deletions(-) diff --git a/.github/workflows/main_deploy.yaml b/.github/workflows/main_deploy.yaml index 3c60b6de4..f5cdd4c32 100644 --- a/.github/workflows/main_deploy.yaml +++ b/.github/workflows/main_deploy.yaml @@ -22,11 +22,9 @@ jobs: run: sudo apt-get update && sudo apt-get install nodejs -y - run: flutter pub get - name: Prepare web - run: | - ./scripts/prepare-web.sh - sed -i 's/href="\/"/href="\/web\/"/' web/index.html + run: ./scripts/prepare-web.sh - name: Build Release Web - run: flutter build web --release --verbose --source-maps + run: flutter build web --release --verbose --source-maps --base-href "/web/" - name: Build Website run: | cd docs && npx tailwindcss -o ./tailwind.css --minify && cd .. diff --git a/web/index.html b/web/index.html index 18cecab84..7ebfd6128 100644 --- a/web/index.html +++ b/web/index.html @@ -11,8 +11,11 @@ For more details: * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base + + This is a placeholder for base href that will be replaced by the value of + the `--base-href` argument provided to `flutter build`. --> - + @@ -30,80 +33,39 @@ FluffyChat - - - + + + + - if ('serviceWorker' in navigator) { - // Service workers are supported. Use them. - window.addEventListener('load', function () { - // Wait for registration to finish before dropping the - - - + +