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(hmr): Make HMR work with Nuxt #631

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

peterbud
Copy link
Contributor

@peterbud peterbud commented Nov 7, 2023

Description

Fixes #528 #445
HMR was not working with Nuxt (Vue3 however was able to do HMR).

I'm not a Vite expert, so any help would be appreciated if I misinterpreted the way how histoire is working.

  • Previously even for build command HMR was turned on for client builds. Using the command === 'build' check in build command HMR is turned off
  • For dev builds ('serve'), two vite servers are being launched. First the "normal" one and second the "node server" I believe for collecting the stories. However for the node server HMR is disabled. I believe this has disabled/interfered with the HMR of the first vite server. Changing the launch order makes HMR work for Nuxt as well.

Additional context

If there is a better way to achieve the same, let me know.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • If it's a new feature, provide a convincing reason to add it. Ideally, you should open a suggestion issue first and have it approved before working on it.
  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Copy link

stackblitz bot commented Nov 7, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

codesandbox bot commented Nov 7, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for histoire-examples-svelte3 ready!

Name Link
🔨 Latest commit 321967e
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-svelte3/deploys/654a53107de0b400077c8bb6
😎 Deploy Preview https://deploy-preview-631--histoire-examples-svelte3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for histoire-controls ready!

Name Link
🔨 Latest commit 321967e
🔍 Latest deploy log https://app.netlify.com/sites/histoire-controls/deploys/654a531028b56300085bae73
😎 Deploy Preview https://deploy-preview-631--histoire-controls.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for histoire-examples-vue3 ready!

Name Link
🔨 Latest commit 321967e
🔍 Latest deploy log https://app.netlify.com/sites/histoire-examples-vue3/deploys/654a5310c54720000822bafd
😎 Deploy Preview https://deploy-preview-631--histoire-examples-vue3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 7, 2023

Deploy Preview for histoire-site ready!

Name Link
🔨 Latest commit 321967e
🔍 Latest deploy log https://app.netlify.com/sites/histoire-site/deploys/654a531027836a00082abf4b
😎 Deploy Preview https://deploy-preview-631--histoire-site.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Akryum Akryum merged commit 86c89cf into histoire-dev:main Nov 13, 2023
15 checks passed
@peterbud peterbud deleted the fix/hmr branch November 13, 2023 10:55
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.

HMR no working on Nuxt 3.4.3
2 participants