Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
e1a0204f
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
750
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
e1a0204f
编写于
1月 13, 2024
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uvue): 优化 web 端日志输出,sourcemap
上级
2c123ed4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
35 addition
and
41 deletion
+35
-41
packages/uni-h5-vite/src/plugins/sourcemap.ts
packages/uni-h5-vite/src/plugins/sourcemap.ts
+26
-22
packages/uni-uts-v1/package.json
packages/uni-uts-v1/package.json
+2
-1
pnpm-lock.yaml
pnpm-lock.yaml
+7
-18
未找到文件。
packages/uni-h5-vite/src/plugins/sourcemap.ts
浏览文件 @
e1a0204f
...
...
@@ -31,33 +31,37 @@ class PendingRequests extends Map<string, PendingRequest> {
_inputDir
!
:
string
_server
!
:
ViteDevServer
set
(
key
:
string
,
value
:
PendingRequest
)
{
value
.
request
=
Promise
.
resolve
(
value
.
request
).
then
(
async
(
request
)
=>
{
const
map
=
request
?.
map
if
(
map
)
{
const
mod
=
await
this
.
_server
.
moduleGraph
.
ensureEntryFromUrl
(
key
)
if
(
mod
.
file
&&
isAbsolute
(
mod
.
file
))
{
const
dir
=
normalizePath
(
dirname
(
mod
.
file
))
if
(
dir
.
startsWith
(
this
.
_inputDir
))
{
for
(
let
sourcesIndex
=
0
;
sourcesIndex
<
map
.
sources
.
length
;
++
sourcesIndex
)
{
const
sourcePath
=
map
.
sources
[
sourcesIndex
]
if
(
sourcePath
)
{
// 将相对路径转换为绝对路径
if
(
!
isAbsolute
(
sourcePath
))
{
map
.
sources
[
sourcesIndex
]
=
normalizePath
(
join
(
dir
,
sourcePath
)
)
value
.
request
=
value
.
request
.
then
(
async
(
request
)
=>
{
const
map
=
request
?.
map
if
(
map
)
{
const
mod
=
await
this
.
_server
.
moduleGraph
.
ensureEntryFromUrl
(
key
)
if
(
mod
.
file
&&
isAbsolute
(
mod
.
file
))
{
const
dir
=
normalizePath
(
dirname
(
mod
.
file
))
if
(
dir
.
startsWith
(
this
.
_inputDir
))
{
for
(
let
sourcesIndex
=
0
;
sourcesIndex
<
map
.
sources
.
length
;
++
sourcesIndex
)
{
const
sourcePath
=
map
.
sources
[
sourcesIndex
]
if
(
sourcePath
)
{
// 将相对路径转换为绝对路径
if
(
!
isAbsolute
(
sourcePath
))
{
map
.
sources
[
sourcesIndex
]
=
normalizePath
(
join
(
dir
,
sourcePath
)
)
}
}
}
}
}
}
}
return
request
})
return
request
})
.
catch
(()
=>
{
return
null
})
return
super
.
set
(
key
,
value
)
}
}
packages/uni-uts-v1/package.json
浏览文件 @
e1a0204f
...
...
@@ -18,11 +18,12 @@
},
"license"
:
"Apache-2.0"
,
"dependencies"
:
{
"@babel/code-frame"
:
"^7.23.5"
,
"@dcloudio/uts"
:
"3.0.0-alpha-4000020240111001"
,
"@rollup/pluginutils"
:
"^5.0.5"
,
"@vue/shared"
:
"3.3.11"
,
"android-versions"
:
"^1.8.1"
,
"adm-zip"
:
"^0.5.9"
,
"android-versions"
:
"^1.8.1"
,
"colors"
:
"^1.4.0"
,
"fast-glob"
:
"^3.2.11"
,
"find-cache-dir"
:
"^3.3.2"
,
...
...
pnpm-lock.yaml
浏览文件 @
e1a0204f
...
...
@@ -1397,6 +1397,9 @@ importers:
packages/uni-uts-v1
:
dependencies
:
'
@babel/code-frame'
:
specifier
:
^7.23.5
version
:
7.23.5
'
@dcloudio/uts'
:
specifier
:
3.0.0-alpha-4000020240111001
version
:
link:../uts
...
...
@@ -1651,12 +1654,6 @@ packages:
/@antfu/utils@0.7.6
:
resolution
:
{
integrity
:
sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w==
}
/@babel/code-frame@7.21.4
:
resolution
:
{
integrity
:
sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==
}
engines
:
{
node
:
'
>=6.9.0'
}
dependencies
:
'
@babel/highlight'
:
7.18.6
/@babel/code-frame@7.23.5
:
resolution
:
{
integrity
:
sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==
}
engines
:
{
node
:
'
>=6.9.0'
}
...
...
@@ -1913,14 +1910,6 @@ packages:
transitivePeerDependencies
:
-
supports-color
/@babel/highlight@7.18.6
:
resolution
:
{
integrity
:
sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
}
engines
:
{
node
:
'
>=6.9.0'
}
dependencies
:
'
@babel/helper-validator-identifier'
:
7.19.1
chalk
:
2.4.2
js-tokens
:
4.0.0
/@babel/highlight@7.23.4
:
resolution
:
{
integrity
:
sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==
}
engines
:
{
node
:
'
>=6.9.0'
}
...
...
@@ -2758,7 +2747,7 @@ packages:
resolution
:
{
integrity
:
sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==
}
engines
:
{
node
:
'
>=6.9.0'
}
dependencies
:
'
@babel/code-frame'
:
7.2
1.4
'
@babel/code-frame'
:
7.2
3.5
'
@babel/generator'
:
7.21.5
'
@babel/helper-environment-visitor'
:
7.21.5
'
@babel/helper-function-name'
:
7.21.0
...
...
@@ -7930,7 +7919,7 @@ packages:
resolution
:
{
integrity
:
sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==
}
engines
:
{
node
:
^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0
}
dependencies
:
'
@babel/code-frame'
:
7.2
1.4
'
@babel/code-frame'
:
7.2
3.5
'
@jest/types'
:
27.5.1
'
@types/stack-utils'
:
2.0.1
chalk
:
4.1.2
...
...
@@ -7945,7 +7934,7 @@ packages:
resolution
:
{
integrity
:
sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==
}
engines
:
{
node
:
^14.15.0 || ^16.10.0 || >=18.0.0
}
dependencies
:
'
@babel/code-frame'
:
7.2
1.4
'
@babel/code-frame'
:
7.2
3.5
'
@jest/types'
:
29.5.0
'
@types/stack-utils'
:
2.0.1
chalk
:
4.1.2
...
...
@@ -9298,7 +9287,7 @@ packages:
resolution
:
{
integrity
:
sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==
}
engines
:
{
node
:
'
>=8'
}
dependencies
:
'
@babel/code-frame'
:
7.2
1.4
'
@babel/code-frame'
:
7.2
3.5
error-ex
:
1.3.2
json-parse-even-better-errors
:
2.3.1
lines-and-columns
:
1.2.4
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录