Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
next.js
提交
b4ade0a3
N
next.js
项目概览
CoCo_Code_Op2
/
next.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
next.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b4ade0a3
编写于
1月 26, 2019
作者:
T
Tim Neutkens
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Move phases back to next/constants (#6104)"
This reverts commit
9112f63e
.
上级
7adb6c57
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
12 addition
and
11 deletion
+12
-11
packages/next-server/lib/constants.js
packages/next-server/lib/constants.js
+4
-0
packages/next-server/server/next-server.ts
packages/next-server/server/next-server.ts
+2
-2
packages/next/build/babel/plugins/next-to-next-server.ts
packages/next/build/babel/plugins/next-to-next-server.ts
+3
-0
packages/next/build/index.ts
packages/next/build/index.ts
+1
-1
packages/next/export/index.js
packages/next/export/index.js
+1
-2
packages/next/lib/constants.js
packages/next/lib/constants.js
+0
-5
packages/next/server/next-dev-server.js
packages/next/server/next-dev-server.js
+1
-1
未找到文件。
packages/next-server/lib/constants.js
浏览文件 @
b4ade0a3
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
'
...
...
packages/next-server/server/next-server.ts
浏览文件 @
b4ade0a3
...
...
@@ -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
{
...
...
packages/next/build/babel/plugins/next-to-next-server.ts
浏览文件 @
b4ade0a3
...
...
@@ -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
'
}
...
...
packages/next/build/index.ts
浏览文件 @
b4ade0a3
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
'
...
...
packages/next/export/index.js
浏览文件 @
b4ade0a3
...
...
@@ -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
'
...
...
packages/next/lib/constants.js
浏览文件 @
b4ade0a3
...
...
@@ -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
'
packages/next/server/next-dev-server.js
浏览文件 @
b4ade0a3
...
...
@@ -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
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录