From 82f02d70a663baea3a2daaffabb60f171ec7ed40 Mon Sep 17 00:00:00 2001 From: stdavis Date: Tue, 28 Mar 2023 16:00:26 -0600 Subject: [PATCH] fix: include service worker in build --- Gruntfile.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 24ca8a7..1a6cc17 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -65,7 +65,7 @@ module.exports = function (grunt) { { expand: true, cwd: 'src/', - src: ['*.html'], + src: ['*.html', 'ServiceWorker.js'], dest: 'dist/' } ] diff --git a/package.json b/package.json index 65d9135..6e9a4a9 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,8 @@ "start": "npm run build:sw && concurrently \"npm run start:app\" \"npm run start:firebase-emulators\"", "start:app": "dotenv grunt", "start:firebase-emulators": "firebase emulators:start --import emulator_data --export-on-exit --only functions,auth,ui,firestore", - "build:stage": "grunt build-stage", - "build:prod": "grunt build-prod", + "build:stage": "npm run build:sw && grunt build-stage", + "build:prod": "npm run build:sw && grunt build-prod", "build:sw": "esbuild _src/ServiceWorker.js --bundle --outfile=src/ServiceWorker.js --define:process.env.FIREBASE_CONFIG=$(npx dotenv -p FIREBASE_CONFIG)" }, "browserslist": {