You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In How to serve static files? #1080axios.get('data/data.json',).then((data) => console.log(data)) inlines the potentially huge data.json and the http request fails.
What if we could add "?static" to those urls, and have parceljs simply copy the resulting file to /dist? Parcel should still mangle the filename for cache busting.
Going a little further, "?static&no-mangle" could tell parcel to copy the file as-is without mangling the filename.
Granted there are workarounds for all of the problems listed above, but it would be nice to have a simple and generic way to sidestep the problem without searching for the specific answer.
The text was updated successfully, but these errors were encountered:
There are many situations where people want a way to use a file as-is without its contents being mangled by parceljs. For example...
<link rel="manifest" href="manifest.json">
transforms manifest.json into a .js filefunction MyComponent () { return <iframe src='./assets/index.html' /> }
needed the html file to be unadulterated.axios.get('data/data.json',).then((data) => console.log(data))
inlines the potentially huge data.json and the http request fails.What if we could add "?static" to those urls, and have parceljs simply copy the resulting file to
/dist
? Parcel should still mangle the filename for cache busting.Going a little further, "?static&no-mangle" could tell parcel to copy the file as-is without mangling the filename.
Granted there are workarounds for all of the problems listed above, but it would be nice to have a simple and generic way to sidestep the problem without searching for the specific answer.
The text was updated successfully, but these errors were encountered: