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
|
||||
module.exports = function (opts) {
|
||||
return new Server(opts)
|
||||
module.exports = function (options) {
|
||||
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 HotReloader from './hot-reloader'
|
||||
import {route} from 'next-server/dist/server/router'
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
// This file is used for when users run `require('next')`
|
||||
module.exports = (opts) => {
|
||||
const Server = opts.dev ? require('./next-dev-server').default : require('next-server').default
|
||||
return new Server(opts)
|
||||
module.exports = (options) => {
|
||||
if (options.dev) {
|
||||
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