Closed
Description
Description
I'm trying to publish a simple app to firebase just to try the new pwa stuff. I'm not sure what I'm doing wrong, After publishing and accesing the app I see a bunch of erors in the console and the service worker doesn't seem to be working. It seem like the sw has the local paths to the chunks hardcoded.
Expected behavior
App would be deployed, run without errors ad sw would work.
Actual behavior
App runs but get th error below in the browser console:
service-worker.js:1 Fetch API cannot load file:///D:/projects/pwa/test1/build/static/css/main.9a0fe4f1.css. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ service-worker.js:1
(anonymous) @ service-worker.js:1
service-worker.js:1 Fetch API cannot load file:///D:/projects/pwa/test1/build/static/js/main.11406a5c.js. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ service-worker.js:1
(anonymous) @ service-worker.js:1
service-worker.js:1 Fetch API cannot load file:///D:/projects/pwa/test1/build/static/media/logo.5d5d9eef.svg. URL scheme must be "http" or "https" for CORS request.
(anonymous) @ service-worker.js:1
(anonymous) @ service-worker.js:1
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch
at https://react-pwa-d6f69.firebaseapp.com/service-worker.js:1:2076
at Array.map (native)
at https://react-pwa-d6f69.firebaseapp.com/service-worker.js:1:1990
at <anonymous>
Environment
react-scripts
: 1.0.0node -v
: 6.2.1npm -v
: 3.9.3- Operating system: Windows 10
- Browser and version: Chrome 58
Reproducible Demo
https://github.com/andrantis/react-pwa-test/tree/default-sw