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

Add support for micro 10 #132

Closed
wants to merge 4 commits into from
Closed

Conversation

thinkverse
Copy link
Contributor

@thinkverse thinkverse commented Jan 1, 2023

This PR adds support for micro 10, opening as a draft since the support isn't at 100% yet. File reloading isn't working atm, the server restarts but the files aren't reloaded. 🤷‍♂️

Feature Set

  • Hot Reloading
  • Logs
  • Beautiful JSON
  • Clipboard Support
  • Port Selection
  • Debug in Your Network
  • Duration Logs
  • Pretty Errors

Closes #131

@thinkverse
Copy link
Contributor Author

thinkverse commented Jan 2, 2023

I've narrowed down the hot reloading issue. It seems that due to the new handle function using import and not require like the old handle function. micro-dev relies on the fact that we can invalidate the cache to then load in the new version. If I migrate the old function internally to micro-dev then the hot reloading works again.

I don't know what the best option would be here. The easiest is to migrate the old function internally, the more complicated version would be to re-write micro-dev to use import, then rely on the new handle function and find a way to invalidate the import cache.

What are your thoughts on this @leerob? 🤔 I cannot seems to find a way, at least online to invalidate the import cache. It appears to be immutable by design.

@thinkverse
Copy link
Contributor Author

Gonna have to update to ESM and imports anyway, since micro support it, micro-dev should do it as well. 🤷‍♂️

@thinkverse
Copy link
Contributor Author

Superseded by the need for #127, will close this and open another PR once that is closed.

@thinkverse thinkverse closed this Jan 2, 2023
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.

Not compatible with micro v10.x
1 participant