Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
9112f63e
Unverified
Commit
9112f63e
authored
Jan 23, 2019
by
Tim Neutkens
Committed by
GitHub
Jan 23, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move phases back to next/constants (#6104)
* Move phases back to next/constants * Fix typescript error
parent
d6ec10a4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
12 deletions
+11
-12
constants.js
packages/next-server/lib/constants.js
+0
-4
next-server.ts
packages/next-server/server/next-server.ts
+2
-2
next-to-next-server.ts
packages/next/build/babel/plugins/next-to-next-server.ts
+0
-3
index.ts
packages/next/build/index.ts
+1
-1
index.js
packages/next/export/index.js
+2
-1
constants.js
packages/next/lib/constants.js
+5
-0
next-dev-server.js
packages/next/server/next-dev-server.js
+1
-1
No files found.
packages/next-server/lib/constants.js
View file @
9112f63e
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
PAGES_MANIFEST
=
'pages-manifest.json'
export
const
BUILD_MANIFEST
=
'build-manifest.json'
export
const
BUILD_MANIFEST
=
'build-manifest.json'
export
const
REACT_LOADABLE_MANIFEST
=
'react-loadable-manifest.json'
export
const
REACT_LOADABLE_MANIFEST
=
'react-loadable-manifest.json'
...
...
packages/next-server/server/next-server.ts
View file @
9112f63e
...
@@ -10,7 +10,7 @@ import {serveStatic} from './serve-static'
...
@@ -10,7 +10,7 @@ import {serveStatic} from './serve-static'
import
Router
,
{
route
,
Route
}
from
'./router'
import
Router
,
{
route
,
Route
}
from
'./router'
import
{
isInternalUrl
,
isBlockedPage
}
from
'./utils'
import
{
isInternalUrl
,
isBlockedPage
}
from
'./utils'
import
loadConfig
from
'next-server/next-config'
import
loadConfig
from
'next-server/next-config'
import
{
PHASE_PRODUCTION_SERVER
,
BUILD_ID_FILE
,
CLIENT_STATIC_FILES_PATH
,
CLIENT_STATIC_FILES_RUNTIME
}
from
'next-server/constants'
import
{
BUILD_ID_FILE
,
CLIENT_STATIC_FILES_PATH
,
CLIENT_STATIC_FILES_RUNTIME
}
from
'next-server/constants'
import
*
as
envConfig
from
'../lib/runtime-config'
import
*
as
envConfig
from
'../lib/runtime-config'
import
{
loadComponents
}
from
'./load-components'
import
{
loadComponents
}
from
'./load-components'
...
@@ -74,7 +74,7 @@ export default class Server {
...
@@ -74,7 +74,7 @@ export default class Server {
}
}
private
currentPhase
():
string
{
private
currentPhase
():
string
{
return
PHASE_PRODUCTION_SERVER
return
'phase-production-server'
}
}
private
logError
(...
args
:
any
):
void
{
private
logError
(...
args
:
any
):
void
{
...
...
packages/next/build/babel/plugins/next-to-next-server.ts
View file @
9112f63e
...
@@ -10,9 +10,6 @@ export default function NextToNextServer (): PluginObj {
...
@@ -10,9 +10,6 @@ export default function NextToNextServer (): PluginObj {
if
(
source
===
'next/dynamic'
)
{
if
(
source
===
'next/dynamic'
)
{
path
.
node
.
source
.
value
=
'next-server/dynamic'
path
.
node
.
source
.
value
=
'next-server/dynamic'
}
}
if
(
source
===
'next/constants'
)
{
path
.
node
.
source
.
value
=
'next-server/constants'
}
if
(
source
===
'next/config'
)
{
if
(
source
===
'next/config'
)
{
path
.
node
.
source
.
value
=
'next-server/config'
path
.
node
.
source
.
value
=
'next-server/config'
}
}
...
...
packages/next/build/index.ts
View file @
9112f63e
import
{
join
}
from
'path'
import
{
join
}
from
'path'
import
nanoid
from
'nanoid'
import
nanoid
from
'nanoid'
import
loadConfig
from
'next-server/next-config'
import
loadConfig
from
'next-server/next-config'
import
{
PHASE_PRODUCTION_BUILD
}
from
'
next-server
/constants'
import
{
PHASE_PRODUCTION_BUILD
}
from
'
../lib
/constants'
import
getBaseWebpackConfig
from
'./webpack-config'
import
getBaseWebpackConfig
from
'./webpack-config'
import
{
generateBuildId
}
from
'./generate-build-id'
import
{
generateBuildId
}
from
'./generate-build-id'
import
{
writeBuildId
}
from
'./write-build-id'
import
{
writeBuildId
}
from
'./write-build-id'
...
...
packages/next/export/index.js
View file @
9112f63e
...
@@ -6,7 +6,8 @@ import mkdirp from 'mkdirp-then'
...
@@ -6,7 +6,8 @@ import mkdirp from 'mkdirp-then'
import
{
resolve
,
join
}
from
'path'
import
{
resolve
,
join
}
from
'path'
import
{
existsSync
,
readFileSync
}
from
'fs'
import
{
existsSync
,
readFileSync
}
from
'fs'
import
loadConfig
from
'next-server/next-config'
import
loadConfig
from
'next-server/next-config'
import
{
PHASE_EXPORT
,
SERVER_DIRECTORY
,
PAGES_MANIFEST
,
CONFIG_FILE
,
BUILD_ID_FILE
,
CLIENT_STATIC_FILES_PATH
}
from
'next-server/constants'
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
*
as
envConfig
from
'next-server/config'
import
*
as
envConfig
from
'next-server/config'
import
createProgress
from
'tty-aware-progress'
import
createProgress
from
'tty-aware-progress'
...
...
packages/next/lib/constants.js
View file @
9112f63e
...
@@ -10,3 +10,8 @@ export const NEXT_PROJECT_ROOT_DIST_SERVER = join(NEXT_PROJECT_ROOT_DIST, 'serve
...
@@ -10,3 +10,8 @@ export const NEXT_PROJECT_ROOT_DIST_SERVER = join(NEXT_PROJECT_ROOT_DIST, 'serve
// we have to use a private alias
// we have to use a private alias
export
const
PAGES_DIR_ALIAS
=
'private-next-pages'
export
const
PAGES_DIR_ALIAS
=
'private-next-pages'
export
const
DOT_NEXT_ALIAS
=
'private-dot-next'
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'
packages/next/server/next-dev-server.js
View file @
9112f63e
...
@@ -2,7 +2,7 @@ import Server from 'next-server/dist/server/next-server'
...
@@ -2,7 +2,7 @@ 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'
import
{
PHASE_DEVELOPMENT_SERVER
}
from
'
next-server
/constants'
import
{
PHASE_DEVELOPMENT_SERVER
}
from
'
../lib
/constants'
import
ErrorDebug
from
'./error-debug'
import
ErrorDebug
from
'./error-debug'
export
default
class
DevServer
extends
Server
{
export
default
class
DevServer
extends
Server
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment