mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Revert "Move phases back to next/constants (#6104)"
This reverts commit 9112f63eba
.
This commit is contained in:
parent
7adb6c57f4
commit
b4ade0a3cd
|
@ -1,3 +1,7 @@
|
|||
export const PHASE_EXPORT = 'phase-export'
|
||||
export const PHASE_PRODUCTION_BUILD = 'phase-production-build'
|
||||
export const PHASE_PRODUCTION_SERVER = 'phase-production-server'
|
||||
export const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'
|
||||
export const PAGES_MANIFEST = 'pages-manifest.json'
|
||||
export const BUILD_MANIFEST = 'build-manifest.json'
|
||||
export const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'
|
||||
|
|
|
@ -10,7 +10,7 @@ import {serveStatic} from './serve-static'
|
|||
import Router, {route, Route} from './router'
|
||||
import { isInternalUrl, isBlockedPage } from './utils'
|
||||
import loadConfig from 'next-server/next-config'
|
||||
import {BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH, CLIENT_STATIC_FILES_RUNTIME} from 'next-server/constants'
|
||||
import {PHASE_PRODUCTION_SERVER, BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH, CLIENT_STATIC_FILES_RUNTIME} from 'next-server/constants'
|
||||
import * as envConfig from '../lib/runtime-config'
|
||||
import {loadComponents} from './load-components'
|
||||
|
||||
|
@ -74,7 +74,7 @@ export default class Server {
|
|||
}
|
||||
|
||||
private currentPhase(): string {
|
||||
return 'phase-production-server'
|
||||
return PHASE_PRODUCTION_SERVER
|
||||
}
|
||||
|
||||
private logError(...args: any): void {
|
||||
|
|
|
@ -10,6 +10,9 @@ export default function NextToNextServer (): PluginObj {
|
|||
if (source === 'next/dynamic') {
|
||||
path.node.source.value = 'next-server/dynamic'
|
||||
}
|
||||
if (source === 'next/constants') {
|
||||
path.node.source.value = 'next-server/constants'
|
||||
}
|
||||
if (source === 'next/config') {
|
||||
path.node.source.value = 'next-server/config'
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { join } from 'path'
|
||||
import nanoid from 'nanoid'
|
||||
import loadConfig from 'next-server/next-config'
|
||||
import { PHASE_PRODUCTION_BUILD } from '../lib/constants'
|
||||
import { PHASE_PRODUCTION_BUILD } from 'next-server/constants'
|
||||
import getBaseWebpackConfig from './webpack-config'
|
||||
import {generateBuildId} from './generate-build-id'
|
||||
import {writeBuildId} from './write-build-id'
|
||||
|
|
|
@ -6,8 +6,7 @@ import mkdirp from 'mkdirp-then'
|
|||
import { resolve, join } from 'path'
|
||||
import { existsSync, readFileSync } from 'fs'
|
||||
import loadConfig from 'next-server/next-config'
|
||||
import { PHASE_EXPORT } from '../lib/constants'
|
||||
import { SERVER_DIRECTORY, PAGES_MANIFEST, CONFIG_FILE, BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH } from 'next-server/constants'
|
||||
import { PHASE_EXPORT, SERVER_DIRECTORY, PAGES_MANIFEST, CONFIG_FILE, BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH } from 'next-server/constants'
|
||||
import * as envConfig from 'next-server/config'
|
||||
import createProgress from 'tty-aware-progress'
|
||||
|
||||
|
|
|
@ -10,8 +10,3 @@ export const NEXT_PROJECT_ROOT_DIST_SERVER = join(NEXT_PROJECT_ROOT_DIST, 'serve
|
|||
// we have to use a private alias
|
||||
export const PAGES_DIR_ALIAS = 'private-next-pages'
|
||||
export const DOT_NEXT_ALIAS = 'private-dot-next'
|
||||
|
||||
export const PHASE_EXPORT = 'phase-export'
|
||||
export const PHASE_PRODUCTION_BUILD = 'phase-production-build'
|
||||
export const PHASE_PRODUCTION_SERVER = 'phase-production-server'
|
||||
export const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'
|
||||
|
|
|
@ -2,7 +2,7 @@ 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'
|
||||
import {PHASE_DEVELOPMENT_SERVER} from '../lib/constants'
|
||||
import {PHASE_DEVELOPMENT_SERVER} from 'next-server/constants'
|
||||
import ErrorDebug from './error-debug'
|
||||
|
||||
export default class DevServer extends Server {
|
||||
|
|
Loading…
Reference in a new issue