How to use environment file constant into firebase-service-worker.js

In my angular application, have added the firebase service worker functionality for the push notification. As currently I am maintaining the firebase setting at two place 1. environment.ts and 2. firebase-messaging-sw.js. Please refer the below settings that I am using in both file

 apiKey: 'samplekey',
authDomain: 'sampleDomain',
databaseURL: 'sampleDatabase url',
projectId: 'sample project id',
storageBucket: 'sample storage',
messagingSenderId: 'sample sender id',
appId: 'sample app id',
measurementId: 'sample value',

I want to maintain the above setting in environment.ts file only and want to access the setting in firebase-messaging-sw.js also from environment file, so please help me how can I achieve this.