Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
next.js
提交
08e7fa16
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,发现更多精彩内容 >>
未验证
提交
08e7fa16
编写于
6月 02, 2020
作者:
T
Tim Neutkens
提交者:
GitHub
6月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Get rid of autodll (#13669)
Prepares for the upgrade to webpack 5
上级
7f6c6f03
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
6 addition
and
178 deletion
+6
-178
packages/next/build/bundles/autodll-webpack-plugin.js
packages/next/build/bundles/autodll-webpack-plugin.js
+0
-15
packages/next/build/webpack-config.ts
packages/next/build/webpack-config.ts
+1
-27
packages/next/build/webpack/plugins/build-manifest-plugin.ts
packages/next/build/webpack/plugins/build-manifest-plugin.ts
+0
-7
packages/next/compiled/autodll-webpack-plugin/LICENSE
packages/next/compiled/autodll-webpack-plugin/LICENSE
+0
-21
packages/next/compiled/autodll-webpack-plugin/autodll-webpack-plugin.js
...compiled/autodll-webpack-plugin/autodll-webpack-plugin.js
+0
-1
packages/next/compiled/autodll-webpack-plugin/package.json
packages/next/compiled/autodll-webpack-plugin/package.json
+0
-1
packages/next/package.json
packages/next/package.json
+0
-1
packages/next/taskfile.js
packages/next/taskfile.js
+2
-11
packages/next/types/misc.d.ts
packages/next/types/misc.d.ts
+0
-21
yarn.lock
yarn.lock
+3
-73
未找到文件。
packages/next/build/bundles/autodll-webpack-plugin.js
已删除
100644 → 0
浏览文件 @
7f6c6f03
/* eslint-disable import/no-extraneous-dependencies */
const
path
=
require
(
'
path
'
)
module
.
exports
=
(
distDir
)
=>
{
const
autodllCachePath
=
path
.
resolve
(
path
.
join
(
distDir
,
'
cache
'
,
'
autodll-webpack-plugin
'
)
)
const
autoDllWebpackPluginPaths
=
require
(
'
autodll-webpack-plugin/lib/paths
'
)
autoDllWebpackPluginPaths
.
cacheDir
=
autodllCachePath
autoDllWebpackPluginPaths
.
getManifestPath
=
(
hash
)
=>
(
bundleName
)
=>
path
.
resolve
(
autodllCachePath
,
hash
,
`
${
bundleName
}
.manifest.json`
)
return
require
(
'
autodll-webpack-plugin
'
)
}
packages/next/build/webpack-config.ts
浏览文件 @
08e7fa16
...
...
@@ -328,13 +328,6 @@ export default async function getBaseWebpackConfig(
},
}
const
devtool
=
process
.
env
.
__NEXT_TEST_MODE
&&
!
process
.
env
.
__NEXT_TEST_WITH_DEVTOOL
?
false
:
dev
?
'
cheap-module-source-map
'
:
false
const
isModuleCSS
=
(
module
:
{
type
:
string
}):
boolean
=>
{
return
(
// mini-css-extract-plugin
...
...
@@ -897,27 +890,8 @@ export default async function getBaseWebpackConfig(
new
NextJsRequireCacheHotReloader
(),
]
// Webpack 5 has the ability to cache packages persistently, so we
// do not need this DLL plugin:
// Webpack 5 enables HMR automatically in the development mode
if
(
!
isServer
&&
!
isWebpack5
)
{
const
AutoDllPlugin
=
require
(
'
next/dist/compiled/autodll-webpack-plugin
'
)(
distDir
)
devPlugins
.
push
(
new
AutoDllPlugin
({
filename
:
'
[name]_[hash].js
'
,
path
:
'
./static/development/dll
'
,
context
:
dir
,
entry
:
{
dll
:
[
'
react
'
,
'
react-dom
'
],
},
config
:
{
devtool
,
mode
:
webpackMode
,
resolve
:
resolveConfig
,
},
})
)
devPlugins
.
push
(
new
webpack
.
HotModuleReplacementPlugin
())
}
...
...
packages/next/build/webpack/plugins/build-manifest-plugin.ts
浏览文件 @
08e7fa16
...
...
@@ -79,13 +79,6 @@ export default class BuildManifestPlugin {
)
assetMap
.
devFiles
.
push
(...(
reactRefreshChunk
?.
files
??
[]))
for
(
const
filePath
of
Object
.
keys
(
compilation
.
assets
))
{
const
path
=
filePath
.
replace
(
/
\\
/g
,
'
/
'
)
if
(
/^static
\/
development
\/
dll
\/
/
.
test
(
path
))
{
assetMap
.
devFiles
.
push
(
path
)
}
}
// compilation.entrypoints is a Map object, so iterating over it 0 is the key and 1 is the value
for
(
const
[,
entrypoint
]
of
compilation
.
entrypoints
.
entries
())
{
const
result
=
ROUTE_NAME_REGEX
.
exec
(
entrypoint
.
name
)
...
...
packages/next/compiled/autodll-webpack-plugin/LICENSE
已删除
100644 → 0
浏览文件 @
7f6c6f03
MIT License
Copyright (c) 2017 Asaf Katz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
packages/next/compiled/autodll-webpack-plugin/autodll-webpack-plugin.js
已删除
100644 → 0
浏览文件 @
7f6c6f03
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
packages/next/compiled/autodll-webpack-plugin/package.json
已删除
100644 → 0
浏览文件 @
7f6c6f03
{
"name"
:
"autodll-webpack-plugin"
,
"main"
:
"autodll-webpack-plugin.js"
,
"author"
:
"Asaf Katz"
,
"license"
:
"MIT"
}
packages/next/package.json
浏览文件 @
08e7fa16
...
...
@@ -160,7 +160,6 @@
"ast-types"
:
"0.13.2"
,
"async-retry"
:
"1.2.3"
,
"async-sema"
:
"3.0.0"
,
"autodll-webpack-plugin"
:
"0.4.2"
,
"babel-loader"
:
"8.1.0"
,
"babel-plugin-dynamic-import-node"
:
"2.3.3"
,
"cache-loader"
:
"4.1.0"
,
...
...
packages/next/taskfile.js
浏览文件 @
08e7fa16
...
...
@@ -50,7 +50,7 @@ const externals = {
'
webpack/lib/cache/getLazyHashedEtag
'
:
'
webpack/lib/cache/getLazyHashedEtag
'
,
'
webpack/lib/RequestShortener
'
:
'
webpack/lib/RequestShortener
'
,
chokidar
:
'
chokidar
'
,
// dependents: babel-loader, async-retry,
autodll-webpack-plugin,
cache-loader, terser-webpack-plugin
// dependents: babel-loader, async-retry, cache-loader, terser-webpack-plugin
'
find-cache-dir
'
:
'
find-cache-dir
'
,
// dependents: thread-loader
'
loader-runner
'
:
'
loader-runner
'
,
...
...
@@ -104,15 +104,7 @@ export async function ncc_async_sema(task, opts) {
.
ncc
({
packageName
:
'
async-sema
'
,
externals
})
.
target
(
'
compiled/async-sema
'
)
}
// eslint-disable-next-line camelcase
externals
[
'
autodll-webpack-plugin
'
]
=
'
next/dist/compiled/autodll-webpack-plugin
'
export
async
function
ncc_autodll_webpack_plugin
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
'
build/bundles/autodll-webpack-plugin.js
'
)
.
ncc
({
packageName
:
'
autodll-webpack-plugin
'
,
externals
})
.
target
(
'
compiled/autodll-webpack-plugin
'
)
}
// eslint-disable-next-line camelcase
externals
[
'
babel-loader
'
]
=
'
next/dist/compiled/babel-loader
'
export
async
function
ncc_babel_loader
(
task
,
opts
)
{
...
...
@@ -552,7 +544,6 @@ export async function ncc(task) {
'
ncc_arg
'
,
'
ncc_async_retry
'
,
'
ncc_async_sema
'
,
'
ncc_autodll_webpack_plugin
'
,
'
ncc_babel_loader
'
,
'
ncc_cache_loader
'
,
'
ncc_chalk
'
,
...
...
packages/next/types/misc.d.ts
浏览文件 @
08e7fa16
...
...
@@ -226,27 +226,6 @@ declare module 'next/dist/compiled/comment-json' {
export
=
m
}
declare
module
'
autodll-webpack-plugin
'
{
import
webpack
from
'
webpack
'
class
AutoDllPlugin
implements
webpack
.
Plugin
{
constructor
(
settings
?:
{
inject
?:
boolean
plugins
?:
webpack
.
Configuration
[
'
plugins
'
]
context
?:
string
debug
?:
boolean
filename
?:
string
path
?:
string
inherit
?:
boolean
entry
?:
webpack
.
Entry
config
?:
webpack
.
Configuration
})
apply
:
webpack
.
Plugin
[
'
apply
'
];
[
k
:
string
]:
any
}
export
=
AutoDllPlugin
}
declare
module
'
pnp-webpack-plugin
'
{
import
webpack
from
'
webpack
'
...
...
yarn.lock
浏览文件 @
08e7fa16
...
...
@@ -3729,21 +3729,6 @@ atob@^2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
autodll-webpack-plugin@0.4.2:
version "0.4.2"
resolved "https://registry.yarnpkg.com/autodll-webpack-plugin/-/autodll-webpack-plugin-0.4.2.tgz#36e98fbaf30c235d1d5d076330464ac80901415c"
dependencies:
bluebird "^3.5.0"
del "^3.0.0"
find-cache-dir "^1.0.0"
lodash "^4.17.4"
make-dir "^1.0.0"
memory-fs "^0.4.1"
read-pkg "^2.0.0"
tapable "^1.0.0"
webpack-merge "^4.1.0"
webpack-sources "^1.0.1"
autoprefixer@^6.3.1:
version "6.7.7"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
...
...
@@ -5900,17 +5885,6 @@ defined@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
del@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5"
dependencies:
globby "^6.1.0"
is-path-cwd "^1.0.0"
is-path-in-cwd "^1.0.0"
p-map "^1.1.1"
pify "^3.0.0"
rimraf "^2.2.8"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
...
...
@@ -7006,14 +6980,6 @@ find-cache-dir@3.3.1, find-cache-dir@^3.0.0, find-cache-dir@^3.2.0:
make-dir "^3.0.2"
pkg-dir "^4.1.0"
find-cache-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f"
dependencies:
commondir "^1.0.1"
make-dir "^1.0.0"
pkg-dir "^2.0.0"
find-cache-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
...
...
@@ -7556,16 +7522,6 @@ globalyzer@^0.1.0:
version "0.1.4"
resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.4.tgz#bc8e273afe1ac7c24eea8def5b802340c5cc534f"
globby@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
dependencies:
array-union "^1.0.1"
glob "^7.0.3"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"
globby@^8.0.1:
version "8.0.2"
resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.2.tgz#5697619ccd95c5275dbb2d6faa42087c1a941d8d"
...
...
@@ -8477,22 +8433,6 @@ is-observable@^1.1.0:
dependencies:
symbol-observable "^1.1.0"
is-path-cwd@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
is-path-in-cwd@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
dependencies:
is-path-inside "^1.0.0"
is-path-inside@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
dependencies:
path-is-inside "^1.0.1"
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
...
...
@@ -11432,7 +11372,7 @@ p-map-series@^1.0.0:
dependencies:
p-reduce "^1.0.0"
p-map@^1.
1.1, p-map@^1.
2.0:
p-map@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
...
...
@@ -11699,10 +11639,6 @@ path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
path-is-inside@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
path-key@^2.0.0, path-key@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
...
...
@@ -13879,7 +13815,7 @@ rgba-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3"
rimraf@2, rimraf@^2.
2.8, rimraf@^2.
5.4, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1:
rimraf@2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3, rimraf@^2.7.1:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
dependencies:
...
...
@@ -16068,13 +16004,7 @@ webpack-log@^2.0.0:
ansi-colors "^3.0.0"
uuid "^3.3.2"
webpack-merge@^4.1.0:
version "4.2.2"
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.2.2.tgz#a27c52ea783d1398afd2087f547d7b9d2f43634d"
dependencies:
lodash "^4.17.15"
webpack-sources@1.4.3, webpack-sources@^1.0.1, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
webpack-sources@1.4.3, webpack-sources@^1.1.0, webpack-sources@^1.4.0, webpack-sources@^1.4.1, webpack-sources@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
dependencies:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录