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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue where hot reload did not work unless the code is under a package with type module #783

Merged
merged 6 commits into from Mar 9, 2024

Conversation

pmcelhaney
Copy link
Owner

The strategy for hot reloading depends on whether the code is under CommonJS or ESM. For ESM, we import() a URL and append a query string to bust the cache. For CommomJS, we use require() and directly manipulate the cache.

Copy link

changeset-bot bot commented Mar 9, 2024

🦋 Changeset detected

Latest commit: 9c25d8e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
counterfact Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pmcelhaney
Copy link
Owner Author

fixes #765

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 8212042024

Details

  • 30 of 34 (88.24%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 86.227%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/server/module-loader.ts 20 24 83.33%
Totals Coverage Status
Change from base Build 8208192766: -0.02%
Covered Lines: 2774
Relevant Lines: 3267

💛 - Coveralls

@pmcelhaney pmcelhaney merged commit 26aa641 into main Mar 9, 2024
7 checks passed
@pmcelhaney pmcelhaney deleted the patch-commonjs-issue branch March 9, 2024 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants