How can I customize my Service Worker based on environment variables?
问题 Edit: This looks like a duplicate of this Unresolved Question. Do I mark this as answered, or delete? I am using InjectManifest from workbox-webpack-plugin inside a Vue CLI 3 app. The custom service worker that I am injecting into has handling for Firebase Cloud Messaging (FCM). I need to listen for messages from different senders based on my environment (local, staging, and production). Ideally, service-worker.js would look like this: importScripts('https://www.gstatic.com/firebasejs/4.8.1