mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Use correct server path since main was changed
This commit is contained in:
parent
d2cbabbae4
commit
de6d394d73
|
@ -1,4 +1,5 @@
|
||||||
|
// This file is used for when users run `require('next-server')`
|
||||||
const Server = require('./dist/server/next-server').default
|
const Server = require('./dist/server/next-server').default
|
||||||
module.exports = function (opts) {
|
module.exports = function (options) {
|
||||||
return new Server(opts)
|
return new Server(options)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import Server from 'next-server'
|
import Server from 'next-server/dist/server/next-server'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import HotReloader from './hot-reloader'
|
import HotReloader from './hot-reloader'
|
||||||
import {route} from 'next-server/dist/server/router'
|
import {route} from 'next-server/dist/server/router'
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
// This file is used for when users run `require('next')`
|
// This file is used for when users run `require('next')`
|
||||||
module.exports = (opts) => {
|
module.exports = (options) => {
|
||||||
const Server = opts.dev ? require('./next-dev-server').default : require('next-server').default
|
if (options.dev) {
|
||||||
return new Server(opts)
|
const Server = require('./next-dev-server').default
|
||||||
|
return new Server(options)
|
||||||
|
}
|
||||||
|
|
||||||
|
const next = require('next-server')
|
||||||
|
return next(options)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue