Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index.html does not update it's bundle reference when contentHash is true and is watching files. #1886

Closed
raphaklaus opened this issue Aug 12, 2018 · 2 comments
Labels
馃悰 Bug Stale Inactive issues

Comments

@raphaklaus
Copy link

馃悰 bug report

Index.html does not update it's bundle reference when contentHash is true and Parcel is watching files.

馃帥 Configuration (.babelrc, package.json, cli command)

Command line to start: rm -drf dist && ./node_modules/.bin/parcel src/index.html

馃 Expected Behavior

Always re-create index.html accordingly with the newest bundles.

馃槸 Current Behavior

After making some changes in the code, Parcel will automatically build a new bundle for, let's say, your JavaScript code. It will be available in your dist folder. But index.html have a reference to the first bundle.

Software Version(s)
Parcel 1.9.7
Node > 9
npm/Yarn
Operating System Linux
@ghost
Copy link

ghost commented Jan 24, 2020

I have also noticed this. My workaround is to use the bundler API and set the contentHash property to true only when process.env.NODE_ENV === 'production' and watch true when process.env.NODE_ENV !== 'production'.

@github-actions github-actions bot removed the Stale Inactive issues label Jan 24, 2020
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

@github-actions github-actions bot added the Stale Inactive issues label Jul 23, 2020
@github-actions github-actions bot closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 Bug Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

2 participants