diff --git a/server/render.js b/server/render.js index 7e2c9894..40075c3c 100644 --- a/server/render.js +++ b/server/render.js @@ -14,7 +14,7 @@ export async function render (path, req, res, { root = process.cwd() } = {}) { props = await Component.getInitialProps({ req, res }) } - const bundlePath = resolve(root, '.next', '.next', 'pages', path || 'index.js') + const bundlePath = resolve(root, '.next', '.next', 'pages', (path || 'index') + '.js') const component = await fs.readFile(bundlePath, 'utf8') const app = createElement(App, {