Closed jconlon closed 5 years ago
The file would be served at http://127.0.0.1:8080/es5-bundled/data/schema/GenericEntity.avsc (note the /es5-bundled/ part). prpl-server modifies the <base>
tag in index.html, and all assets will be served under the build name.
Thanks for the clue... I was using a path like:
/data/schema/GenericEntity.avsc
and changed it to:
data/schema/GenericEntity.avsc
Which now works for dev, previewing the server and when it is deployed.
Problem fetching local files when previewing prpl-server
Context
npm start
.Setup
data/schema/GenericEntity.avsc
"sources": [
"data/**/*",
npm run build
(I see the files were added to the server bundles. Exampleserver/build/es5-bundled/data/schema/GenericEntity.avsc
Problem
When I preview the prpl-server with:
npm run serve
and manually test the page that fetches this data file, I get404 Not found
errors.Also same problem if I just try a HTTP Get to
http://127.0.0.1:8080/data/schema/GenericEntity.avsc