Browse Source

A few missing configurations

kb/add-usage-guide
Matthew Raymer 12 months ago
parent
commit
7d6a45061d
  1. 2
      src/registerServiceWorker.ts
  2. 3
      vue.config.js

2
src/registerServiceWorker.ts

@ -3,7 +3,7 @@
import { register } from "register-service-worker"; import { register } from "register-service-worker";
if (process.env.NODE_ENV === "production") { if (process.env.NODE_ENV === "production") {
register(`${process.env.BASE_URL}service-worker.js`, { register("/additional-scripts.js", {
ready() { ready() {
console.log( console.log(
"App is being served from cache by a service worker.\n" + "App is being served from cache by a service worker.\n" +

3
vue.config.js

@ -11,8 +11,9 @@ module.exports = defineConfig({
iconPaths: { iconPaths: {
faviconSVG: "img/icons/safari-pinned-tab.svg", faviconSVG: "img/icons/safari-pinned-tab.svg",
}, },
workboxPluginMode: "InjectManifest",
workboxOptions: { workboxOptions: {
importScripts: ["additional-scripts.js"], swSrc: "./sw_scripts/additional-scripts.js",
}, },
}, },
}); });

Loading…
Cancel
Save