Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
菜鸟程序猿_c
uni-app
提交
c9027bed
U
uni-app
项目概览
菜鸟程序猿_c
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c9027bed
编写于
5月 18, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
build(deps): bump vite from 2.3.2 to 2.3.3
上级
e611c3e6
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
1028 addition
and
152 deletion
+1028
-152
package.json
package.json
+1
-1
packages/playground/ssr/package.json
packages/playground/ssr/package.json
+1
-1
packages/playground/ssr/vite.config.js
packages/playground/ssr/vite.config.js
+1
-1
packages/playground/ssr/yarn.lock
packages/playground/ssr/yarn.lock
+27
-33
packages/size-check/package.json
packages/size-check/package.json
+1
-1
packages/size-check/vite.config.ts
packages/size-check/vite.config.ts
+2
-8
packages/uni-h5/package.json
packages/uni-h5/package.json
+1
-1
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
+0
-29
packages/vite-plugin-uni/src/index.ts
packages/vite-plugin-uni/src/index.ts
+29
-3
yarn.lock
yarn.lock
+965
-74
未找到文件。
package.json
浏览文件 @
c9027bed
...
...
@@ -79,7 +79,7 @@
"
semver
"
:
"
^7.3.4
"
,
"
ts-jest
"
:
"
^26.4.4
"
,
"
typescript
"
:
"
~4.1.3
"
,
"
vite
"
:
"
^2.3.
2
"
,
"
vite
"
:
"
^2.3.
3
"
,
"
vue
"
:
"
^3.1.0-beta.3
"
,
"
yorkie
"
:
"
^2.0.0
"
}
...
...
packages/playground/ssr/package.json
浏览文件 @
c9027bed
...
...
@@ -28,6 +28,6 @@
"compression"
:
"^1.7.4"
,
"cypress"
:
"^7.3.0"
,
"serve-static"
:
"^1.14.1"
,
"vite"
:
"^2.3.
2
"
"vite"
:
"^2.3.
3
"
}
}
packages/playground/ssr/vite.config.js
浏览文件 @
c9027bed
...
...
@@ -2,5 +2,5 @@ import { defineConfig } from 'vite'
import
uni
from
'
@dcloudio/vite-plugin-uni
'
// https://vitejs.dev/config/
export
default
defineConfig
({
plugins
:
[
uni
()],
plugins
:
[
uni
(
{
viteLegacyOptions
:
false
}
)],
})
packages/playground/ssr/yarn.lock
浏览文件 @
c9027bed
...
...
@@ -8,9 +8,9 @@
integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==
"@babel/parser@^7.12.0", "@babel/parser@^7.13.9":
version "7.14.
2
"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.
2.tgz#0c1680aa44ad4605b16cbdcc5c341a61bde9c746
"
integrity sha512-
IoVDIHpsgE/fu7eXBeRWt8zLbDrSvD7H1gpomOkPpBoEN8KCruCqSDdqo8dddwQQrui30KSvQBaMUOJiuFu6Q
Q==
version "7.14.
3
"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.
3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298
"
integrity sha512-
7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMR
Q==
"@babel/types@^7.12.0", "@babel/types@^7.13.0":
version "7.14.2"
...
...
@@ -91,7 +91,6 @@
localstorage-polyfill "^1.0.1"
pako "^2.0.3"
safe-area-insets "^1.4.1"
vue-router "^4.0.6"
xmlhttprequest "^1.8.0"
"@dcloudio/uni-i18n@../../uni-i18n":
...
...
@@ -175,9 +174,9 @@
integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==
"@types/node@*":
version "15.
0.3
"
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.
0.3.tgz#ee09fcaac513576474c327da5818d421b98db88a
"
integrity sha512-
/WbxFeBU+0F79z9RdEOXH4CsDga+ibi5M8uEYr91u3CkT/pdWcV8MCook+4wDPnZBexRdwWS+PiVZ2xJviAzc
Q==
version "15.
3.0
"
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.
3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26
"
integrity sha512-
8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9Ys
Q==
"@types/node@^14.14.31":
version "14.14.45"
...
...
@@ -860,9 +859,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.3.723:
version "1.3.7
27
"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.7
27.tgz#857e310ca00f0b75da4e1db6ff0e073cc4a91ddf
"
integrity sha512-
Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg
==
version "1.3.7
30
"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.7
30.tgz#6e1fad8f250827f5524672e572f823b34a6417e1
"
integrity sha512-
1Tr3h09wXhmqXnvDyrRe6MFgTeU0ZXy3+rMJWTrOHh/HNesWwBBrKnMxRJWZ86dzs8qQdw2c7ZE1/qeGHygImA
==
elegant-spinner@^1.0.1:
version "1.0.1"
...
...
@@ -891,10 +890,10 @@ end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
esbuild@^0.11.2
0
:
version "0.11.2
0
"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.2
0.tgz#7cefa1aee8b372c184e42457885f7ce5d3e62a1e
"
integrity sha512-
QOZrVpN/Yz74xfat0H6euSgn3RnwLevY1mJTEXneukz1ln9qB+ieaerRMzSeETpz/UJWsBMzRVR/andBht5WKw
==
esbuild@^0.11.2
3
:
version "0.11.2
3
"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.11.2
3.tgz#c42534f632e165120671d64db67883634333b4b8
"
integrity sha512-
iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q
==
escalade@^3.1.1:
version "3.1.1"
...
...
@@ -1105,9 +1104,9 @@ forwarded@~0.1.2:
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
fraction.js@^4.0.13:
version "4.
0.13
"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.
0.13.tgz#3c1c315fa16b35c85fffa95725a36fa729c69dfe
"
integrity sha512-
E1fz2Xs9ltlUp+qbiyx9wmt2n9dRzPsS11Jtdb8D2o+cC7wr9xkkKsVKJuBX0ST+LVS+LhLO+SbLJNtfWcJvXA
==
version "4.
1.0
"
resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.
1.0.tgz#229ec1cedc8c3c7e5d2d20688ba64f0a43af5830
"
integrity sha512-
o9lSKpK0TDqDwTL24Hxqi6I99s942l6TYkfl6WvGWgLOIFz/YonSGKfiSeMadoiNvTfqnfOa9mjb5SGVbBK9/w
==
fresh@0.5.2:
version "0.5.2"
...
...
@@ -1768,9 +1767,9 @@ negotiator@0.6.2:
integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
node-releases@^1.1.71:
version "1.1.7
1
"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.7
1.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb
"
integrity sha512-
zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg
==
version "1.1.7
2
"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.7
2.tgz#14802ab6b1039a79a0c7d662b610a5bbd76eacbe
"
integrity sha512-
LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw
==
normalize-range@^0.1.2:
version "0.1.2"
...
...
@@ -2115,9 +2114,9 @@ rollup-plugin-copy@^3.4.0:
is-plain-object "^3.0.0"
rollup@^2.38.5:
version "2.4
7
.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.4
7.0.tgz#9d958aeb2c0f6a383cacc0401dff02b6e252664d
"
integrity sha512-
rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg
==
version "2.4
8
.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.4
8.0.tgz#fceb01ed771f991f29f7bd2ff7838146e55acb74
"
integrity sha512-
wl9ZSSSsi5579oscSDYSzGn092tCS076YB+TQrzsGuSfYyJeep8eEWj0eaRjuC5McuMNmcnR8icBqiE/FWNB1A
==
optionalDependencies:
fsevents "~2.3.1"
...
...
@@ -2477,23 +2476,18 @@ verror@1.10.0:
core-util-is "1.0.2"
extsprintf "^1.2.0"
vite@^2.3.
2
:
version "2.3.
2
"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.3.
2.tgz#cfac76b04d4dee1c7303b55f563b5b62d32f41fe
"
integrity sha512-
QhLdOompDrfkyryCNTts9HE+eJhvhN9ibKNJ5Q8DpQai+6nOsuIlaveZNg67e1O/2QaWqXeBo82eHnAs1De2bQ
==
vite@^2.3.
3
:
version "2.3.
3
"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.3.
3.tgz#7e88a71abd03985c647789938d784cce0ee3b0fd
"
integrity sha512-
eO1iwRbn3/BfkNVMNJDeANAFCZ5NobYOFPu7IqfY7DcI7I9nFGjJIZid0EViTmLDGwwSUPmRAq3cRBbO3+DsMA
==
dependencies:
esbuild "^0.11.2
0
"
esbuild "^0.11.2
3
"
postcss "^8.2.10"
resolve "^1.19.0"
rollup "^2.38.5"
optionalDependencies:
fsevents "~2.3.1"
vue-router@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.0.6.tgz#91750db507d26642f225b0ec6064568e5fe448d6"
integrity sha512-Y04llmK2PyaESj+N33VxLjGCUDuv9t4q2OpItEGU7POZiuQZaugV6cJpE6Qm1sVFtxufodLKN2y2dQl9nk0Reg==
vue@^3.1.0-beta.3:
version "3.1.0-beta.3"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.1.0-beta.3.tgz#ed7d944b3d276cbdcda8993f73833a05a182bd13"
...
...
packages/size-check/package.json
浏览文件 @
c9027bed
...
...
@@ -6,6 +6,6 @@
"bundler"
:
"vite"
},
"dependencies"
:
{
"vue-router"
:
"^4.0.
7
"
"vue-router"
:
"^4.0.
8
"
}
}
packages/size-check/vite.config.ts
浏览文件 @
c9027bed
import
path
from
'
path
'
import
vue
from
'
@vitejs/plugin-vue
'
import
uni
,
{
uniVueTemplateOptions
}
from
'
@dcloudio/vite-plugin-uni
'
import
uni
from
'
@dcloudio/vite-plugin-uni
'
/**
* @type {import('vite').UserConfig}
...
...
@@ -23,10 +22,5 @@ export default {
},
},
plugins
:
[
vue
({
template
:
uniVueTemplateOptions
,
}),
uni
({
inputDir
:
path
.
resolve
(
__dirname
,
'
src
'
)
}),
],
plugins
:
[
uni
({
viteLegacyOptions
:
false
})],
}
packages/uni-h5/package.json
浏览文件 @
c9027bed
...
...
@@ -29,6 +29,6 @@
},
"peerDependencies"
:
{
"@vue/shared"
:
"^3.1.0-beta.3"
,
"vue-router"
:
"^4.0.
6
"
"vue-router"
:
"^4.0.
8
"
}
}
packages/vite-plugin-uni/src/configResolved/plugins/index.ts
浏览文件 @
c9027bed
...
...
@@ -3,8 +3,6 @@ import { extend } from '@vue/shared'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
FilterPattern
}
from
'
@rollup/pluginutils
'
import
vue
from
'
@vitejs/plugin-vue
'
import
VueJsxPlugin
from
'
@vitejs/plugin-vue-jsx
'
import
ViteLegacyPlugin
from
'
@vitejs/plugin-legacy
'
import
{
API_DEPS_CSS
}
from
'
@dcloudio/uni-cli-shared
'
...
...
@@ -86,15 +84,6 @@ const uniInjectPluginOptions: Partial<InjectOptions> = {
})
},
}
let
vueJsxPlugin
:
typeof
VueJsxPlugin
|
undefined
try
{
vueJsxPlugin
=
require
(
'
@vitejs/plugin-vue-jsx
'
)
}
catch
(
e
)
{}
let
viteLegacyPlugin
:
typeof
ViteLegacyPlugin
|
undefined
try
{
viteLegacyPlugin
=
require
(
'
@vitejs/plugin-legacy
'
)
}
catch
(
e
)
{}
export
function
initPlugins
(
config
:
ResolvedConfig
,
...
...
@@ -171,24 +160,6 @@ export function initPlugins(
addPlugin
(
plugins
,
uniCopyPlugin
(
options
),
plugins
.
length
)
}
if
(
viteLegacyPlugin
&&
options
.
viteLegacyOptions
!==
false
)
{
;(
viteLegacyPlugin
(
options
.
viteLegacyOptions
)
as
unknown
as
Plugin
[]
).
forEach
((
plugin
)
=>
{
if
(
!
plugin
.
apply
||
plugin
.
apply
===
command
)
{
if
(
plugin
.
enforce
===
'
post
'
)
{
addPlugin
(
plugins
,
plugin
,
'
vite:import-analysis
'
,
'
pre
'
)
}
else
{
addPlugin
(
plugins
,
plugin
,
'
vite:vue
'
,
'
pre
'
)
}
}
})
}
if
(
vueJsxPlugin
&&
options
.
vueJsxOptions
!==
false
)
{
addPlugin
(
plugins
,
vueJsxPlugin
(
options
.
vueJsxOptions
),
'
vite:vue
'
,
'
post
'
)
}
if
(
process
.
env
.
DEBUG
)
{
debugPlugin
(
plugins
.
length
)
debugPlugin
(
plugins
.
map
((
p
)
=>
(
p
as
Plugin
).
name
))
...
...
packages/vite-plugin-uni/src/index.ts
浏览文件 @
c9027bed
...
...
@@ -3,6 +3,8 @@ import { UniCompiler, initUniCompiler } from '@dcloudio/uni-cli-shared'
import
{
Options
as
VueOptions
}
from
'
@vitejs/plugin-vue
'
import
{
Options
as
ViteLegacyOptions
}
from
'
@vitejs/plugin-legacy
'
import
{
VueJSXPluginOptions
}
from
'
@vue/babel-plugin-jsx
'
import
VueJsxPlugin
from
'
@vitejs/plugin-vue-jsx
'
import
ViteLegacyPlugin
from
'
@vitejs/plugin-legacy
'
import
{
createConfig
}
from
'
./config
'
import
{
createConfigResolved
}
from
'
./configResolved
'
...
...
@@ -28,9 +30,19 @@ export interface VitePluginUniResolvedOptions extends VitePluginUniOptions {
export
*
from
'
./vue
'
let
createVueJsxPlugin
:
typeof
VueJsxPlugin
|
undefined
try
{
createVueJsxPlugin
=
require
(
'
@vitejs/plugin-vue-jsx
'
)
}
catch
(
e
)
{}
let
createViteLegacyPlugin
:
typeof
ViteLegacyPlugin
|
undefined
try
{
createViteLegacyPlugin
=
require
(
'
@vitejs/plugin-legacy
'
)
}
catch
(
e
)
{}
export
default
function
uniPlugin
(
rawOptions
:
VitePluginUniOptions
=
{}
):
Plugin
{
):
Plugin
[]
{
const
options
:
VitePluginUniResolvedOptions
=
{
...
rawOptions
,
base
:
'
/
'
,
...
...
@@ -43,11 +55,25 @@ export default function uniPlugin(
root
:
process
.
env
.
UNI_CLI_CONTEXT
||
process
.
cwd
(),
}),
}
return
{
const
plugins
:
Plugin
[]
=
[]
if
(
createViteLegacyPlugin
&&
options
.
viteLegacyOptions
!==
false
)
{
plugins
.
push
(
...(
createViteLegacyPlugin
(
options
.
viteLegacyOptions
)
as
unknown
as
Plugin
[])
)
}
if
(
createVueJsxPlugin
&&
options
.
vueJsxOptions
!==
false
)
{
plugins
.
push
(
createVueJsxPlugin
(
options
.
vueJsxOptions
))
}
plugins
.
push
({
name
:
'
vite:uni
'
,
config
:
createConfig
(
options
),
configResolved
:
createConfigResolved
(
options
),
configureServer
:
createConfigureServer
(
options
),
handleHotUpdate
:
createHandleHotUpdate
(
options
),
}
})
return
plugins
}
yarn.lock
浏览文件 @
c9027bed
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录