title: Next.js:_next/webpack-hmr request 404
body: <p>This issue's demo repo is <a href="https://github.com/hh54188/happy-server/tree/issue-demo" rel="nofollow noreferrer">https://github.com/hh54188/happy-server/tree/issue-demo</a></p>
  
  <p>I try to integrate Next.js with Hapi.js as a plugin. Here is my next.js plugin project folder main structure:</p>
  
  <pre><code>--plugins
     |--app
          |--pages
              |--app
                  |--a.js
          |--handlers
          |--public
               |--dist
          |--index.js
          |--next.config.js
  </code></pre>
  
  <p>And here is index.js main content, most for route register</p>
  
  <pre><code>const nextRenderService = next({
    dir: path.join(__dirname)
  });
  
  module.exports = {
    name: "AppService",
    version: "0.0.1",
    register: async function(server, options) {
      await nextRenderService.prepare();
  
      server.route({
        method: "GET",
        path: `/app/${assetPrefix}/_next/webpack-hmr`,
        handler: nextHandlerWrapper(nextRenderService)
      });
  
      server.route({
        method: "GET",
        path: "/app/{param*}",
        handler: defaultHandler(nextRenderService)
      });
  
      server.route({
        method: "GET",
        path: `/app/${assetPrefix}/_next/on-demand-entries-ping`,
        handler: nextHandlerWrapper(nextRenderService)
      });
  
      server.route({
        method: "GET",
        path: `/app/${assetPrefix}/_next/-/page/{param*}`,
        handler: {
          directory: {
            path: path.join(__dirname, pagesPath),
            listing: true
          }
        }
      });
  
      server.route({
        method: "GET",
        path: `/app/${assetPrefix}/_next/{param*}`,
        handler: {
          directory: {
            path: path.join(__dirname, distPath),
            listing: true
          }
        }
      });
    }
  };
  </code></pre>
  
  <p>However, when I run the server, and visit <a href="http://127.0.0.1:4000/app/a" rel="nofollow noreferrer">http://127.0.0.1:4000/app/a</a>, the page could render success, and most script file could load successful. But the <code>_next/webpack-hmr</code> and the <code>_next/on-demand-entries-ping</code> requests status is <code>404</code>. And I notice the 404 status is from Next.js, not Hapi.js</p>
  
  <p>So what's wrong with my code ? How can I solve this problem ?</p>