mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
render: fix bundle path
This commit is contained in:
parent
2d8959d99c
commit
ebb7bc5fbc
|
@ -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, {
|
||||
|
|
Loading…
Reference in a new issue