4👍
✅
According to the documentation, and this answer and this one it seems you have to put the config in a firebase-messaging-sw.js
in your public directory.
Source:stackexchange.com