- 
                Notifications
    You must be signed in to change notification settings 
- Fork 983
Closed
Labels
Milestone
Description
[REQUIRED] Describe your environment
- Operating System version: Mac OS 11.5.1
- Browser version: Chrome
- Firebase SDK version: 9.0.0-beta.8
- Firebase Product: messaging
[REQUIRED] Describe the problem
When I try to import the service worker version of getMessaging:
import { getMessaging } from 'firebase/messaging/sw'; Webpack gives me the following error:
ERROR in ./node_modules/firebase/messaging/sw/dist/index.esm.js 1:0-75
Module not found: Error: Can't resolve '@firebase/messaging/sw' in '/Users/jhuleatt/git/fcm-v9-repro/node_modules/firebase/messaging/sw/dist'
Did you mean 'index.sw.esm2017.js'?
Steps to reproduce:
- Clone https://github.com/jhuleatt/fcm-v9-repro
- src/firebase-messaging-sw.jscontains the- importstatement
- webpack.config.jscontains a very basic webpack config
 
- Run npm install
- Run npm run build
- You'll see that src/index.jscompiles without error, butsrc/firebase-messaging-sw.jsgives the above error.
jonathan-hetrafi