question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to Enable hmr on virtualbox

See original GitHub issue

Sorry for bothering you. I’m new to nextjs as well as webpack and I’ve been stuck in vagrant hmr for almost 1 day. I checked these issues #1899 #823 but still don’t understand how to enable hmr on virtualbox. My host machine is windows too.

I added following part to next.config.js but hmr was not fired after I change files on windows.

module.exports = {
  webpack: (config) => {
    config.watchOptions = {
      poll: 500,
      aggregateTimeout: 300,
    };
    return config;
  },
};

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

12reactions
thundermiraclecommented, Jul 20, 2017

@thetoxicavenger Just change webpack to webpackDevMiddleware will make it work as I posted:

module.exports = {
  webpackDevMiddleware: (config) => {
    // Solve compiling problem via vagrant
    config.watchOptions = {
      poll: 1000,   // Check for changes every second
      aggregateTimeout: 300,   // delay before rebuilding
    };
    return config;
  },
};
3reactions
timneutkenscommented, Jul 20, 2017

@thundermiracle thanks for sharing this for people that experience this issue šŸ‘Œ I’ve turned your code into a code block so it can be easily copy-pasted šŸ‘

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Enable hmr on virtualbox Ā· Issue #2179 Ā· vercel/next.js
I'm new to nextjs as well as webpack and I've been stuck in vagrant hmr for almost 1 day. I checked these issues...
Read more >
HMR Configuration - Oracle Help Center
Header manipulation rules (HMRs) use Oracle Enterprise Communications Broker-specific controls and/or REGEX to identify information in signaling messagesĀ ...
Read more >
HMR3Init: Attempting fall back to NEM (Hyper-V is active)
Generally, trying to disable Hyper-V by unchecking boxes in "Windows Features" often ... If VirtualBox is running without Hyper-V enabled,Ā ...
Read more >
Development - Vagrant - webpack
Configuring the Project. To start, make sure that the Vagrantfile has a static IP; Vagrant.configure(Ā ...
Read more >
Webpack with hot module replacement (HMR) in WordPress ...
Below I've detailed what I have done to get HMR working on my development virtual machine. And also getting a Vue.js app working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found