-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: HTML file is not updated on update; .cache has stale copy #1789
Comments
The same problem for me .... Do you solve that? |
Could you guys try it with the latest stable parcel? (1.9.7) |
@DeMoorJasper I was using the build version and used yarn link. I'll retry with the stable 1.9.7 when I get a chance and comment again |
Not sure if any of the latest commits can cause this issue. If you can provide a test repo, I can fiddle around with it a bit |
@DeMoorJasper stable v1.9.7 has a different issue Here's the repo: https://github.com/hrgui/parcel-html-bug run const apple = require('./apple.html');
console.log(apple); Expected
to be printed in console log Actual Uncaught (in promise) Error: Cannot find module 'apple.html'
at newRequire (learn-parcel.b5f3a9c8.js:39)
at newRequire (learn-parcel.b5f3a9c8.js:23)
at localRequire (learn-parcel.b5f3a9c8.js:54)
at Object.parcelRequire.index.js../apple.html (index.js:1)
at newRequire (learn-parcel.b5f3a9c8.js:48)
at localRequire (learn-parcel.b5f3a9c8.js:54)
at index.js:2 |
@hrgui yeah, that makes sense as the html bundle loader, got pushed to master after 1.9.7 and will be part of the next release |
|
After a bit of debugging I came to the discovery that the changes for processing inline styles and scripts inside html caused generate to output an empty array in most cases, the hash gets calculated based on the output of generate, so in this case an empty hash... Fixed it by adding the asset content to the hash |
Please try out #1861 |
@DeMoorJasper It works out perfectly! One note: is it always supposed to be in a loading state? |
It's not supposed to be in a constant loading state, not sure why that's happening, it worked for me. Feel free to debug it |
@DeMoorJasper it has to do w/ the websocket left open, not sure why probably its something ive done |
Yeah probably, glad the content hash resolved the issue though :) Sent with GitHawk |
🐛 bug report
Repo
parcel index.html
🎛 Configuration (.babelrc, package.json, cli command)
None, ran
parcel index.html
🤔 Expected Behavior
Would expect the console.log to have the updated version of the HTML updated file
😯 Current Behavior
The console.log never updates with the latest version of
apple.html
despite the page knowing there was an update💁 Possible Solution
The only workaround right now is to remove the
.cache
directory and rerun parcel.🔦 Context
Trying out AngularJS experience with Parcel. AngularJS requires HTML templates; but even without AngularJS Parcel does not reload HTML files correctly.
💻 Code Sample
index.js
apple.html
index.html
🌍 Your Environment
The text was updated successfully, but these errors were encountered: