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
contents is a string containing the file content on initial render, and after HMR updates.
😯 Current Behavior
contents is the file contents at initial page load, but is presented as a hash string of the contents if the file is modified. Refreshing the page results in contents containing the file contents inline again.
💁 Possible Solution
Could be crosstalk between react-fast-refresh and HMR, perhaps?
Creating my own module.hot?.accept() didn't seem to make any difference.
🔦 Context
I have a handful of XML files (not RSS/Atom!) that I am loading and parsing. Eventually these will be requested from the backend but for the moment I'm prototyping with them locally.
I was hoping to use import * as files from 'bundle-text:./*.xml' which, again, works great on the initial page load but as I'm tweaking the XML I'd like to get hot reloads.
🐛 bug report
When using
bundle-text:
, hot reloading results in the text being a hash instead of the file content after the file is modified.🎛 Configuration (.babelrc, package.json, cli command)
icons/.parcelrc: (shouldn't matter but just in case?)
🤔 Expected Behavior
contents
is a string containing the file content on initial render, and after HMR updates.😯 Current Behavior
contents
is the file contents at initial page load, but is presented as a hash string of the contents if the file is modified. Refreshing the page results incontents
containing the file contents inline again.💁 Possible Solution
Could be crosstalk between react-fast-refresh and HMR, perhaps?
Creating my own
module.hot?.accept()
didn't seem to make any difference.🔦 Context
I have a handful of XML files (not RSS/Atom!) that I am loading and parsing. Eventually these will be requested from the backend but for the moment I'm prototyping with them locally.
I was hoping to use
import * as files from 'bundle-text:./*.xml'
which, again, works great on the initial page load but as I'm tweaking the XML I'd like to get hot reloads.I am working around this with e.g.:
These do update via HMR correctly, as expected, when modified.
💻 Code Sample
🌍 Your Environment
The text was updated successfully, but these errors were encountered: