question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can we serve static asset "as is" with parcel?

See original GitHub issue

❔ Question

Can we serve static asset “as is” with parcel? E.g. parcel index.html --static ./static/, then the static files inside ./static/ will be served.

🔦 Context

I am trying to access to a JSON file with fetch so that I could treat that file as a mock API end point.

I tried to search around and couldn’t find anything in parcel that will allow me to do this?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
DeMoorJaspercommented, Dec 12, 2018

@ycmjason currently not, it will be configurable in parcel 2

0reactions
ycmjasoncommented, Dec 12, 2018

I guess I can close this then! 😃 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to serve static files? #1080 - parcel-bundler/parcel
In my case I only need it for images. Perhaps other types of assets will get processed and won't work so well.
Read more >
📦 Assets
Parcel is based around assets. An asset can represent any file, but Parcel has special support for certain types of assets like JavaScript,...
Read more >
How do I include asset files with parcel js?
I have a folder of dynamically loaded asset files I want to include in my parcel output directory. How can I include unreferenced...
Read more >
Serve Static Files during Development with Parcel - liman.io
Leveraging the API proxy, we can serve static files at /static using Parcel from a directory called public with the following configuration ...
Read more >
parcel-plugin-static-files-copy
Start using parcel-plugin-static-files-copy in your project by running `npm i parcel-plugin-static-files-copy`. There are 9 other projects ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found