Description
Describe the bug
The dev experience should work in a similar fashion to the production environment.
To reproduce
Steps to reproduce the behavior:
- Start with a scaffolded project
yarn build
DEBUG=hastily:*,upward* yarn start
curl URL of upward + image
(for examplecurl https://fooman-pwa-frontend-gh6ov.local.pwadev:9730/venia-static/veniaClosed.png
)- note upward output
GET /venia-static/veniaClosed.png 200 285.921 ms - 28966
- stop serve (ctrl +c)
DEBUG=hastily:*,upward* yarn watch
- Repeat 4 with dev server url
Expected behavior
the watch console should show a similar output on 4 and 8. Seeing no output would indicate the response was not provided by upward.
Overall use case that I was trying to work out was to use the image optimisation on static files that are provided in the frontend rather than hosted on the back-end.
Possible solutions
My best guess is that webpack's dev server gets prioritised on existing files before upward. As a comparison running against a proxied image file, ie using curl with a product image starting with media/catalog/product/ this will again show that the response has gone through upward.
Please complete the following device information:
- Device [e.g. iPhone6, PC, Mac, Pixel3]:
- OS [e.g. iOS8.1, Windows 10]:
- Browser [e.g. Chrome, Safari]:
- Browser Version [e.g. 22]:
- Magento Version:
- PWA Studio Version:
- NPM version
npm -v
: - Node Version
node -v
:
Please let us know what packages this bug is in regards to:
-
venia-concept
-
venia-ui
-
pwa-buildpack
-
peregrine
-
pwa-devdocs
-
upward-js
-
upward-spec
-
create-pwa