Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
20岁爱吃必胜客
uni-app
提交
0838eaee
U
uni-app
项目概览
20岁爱吃必胜客
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
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,发现更多精彩内容 >>
提交
0838eaee
编写于
1月 16, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(cli): add uniCloud
上级
cf3d10d7
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
20 addition
and
7 deletion
+20
-7
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
+5
-1
packages/vue-cli-plugin-uni/commands/build.js
packages/vue-cli-plugin-uni/commands/build.js
+5
-2
packages/vue-cli-plugin-uni/lib/app-plus/index.js
packages/vue-cli-plugin-uni/lib/app-plus/index.js
+3
-1
packages/vue-cli-plugin-uni/lib/h5/index.js
packages/vue-cli-plugin-uni/lib/h5/index.js
+4
-2
packages/vue-cli-plugin-uni/lib/mp.js
packages/vue-cli-plugin-uni/lib/mp.js
+3
-1
未找到文件。
packages/vue-cli-plugin-hbuilderx/build/webpack.nvue.conf.js
浏览文件 @
0838eaee
...
...
@@ -36,7 +36,11 @@ const uniPath = process.env.UNI_USING_V8
?
'
../packages/uni-app-plus-nvue-v8/dist/index.js
'
:
'
../packages/uni-app-plus-nvue/dist/index.js
'
const
provide
=
{}
const
uniCloudPath
=
require
.
resolve
(
'
@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js
'
)
const
provide
=
{
'
uniCloud
'
:
[
uniCloudPath
,
'
default
'
]
}
if
(
process
.
env
.
UNI_USING_V3
||
process
.
env
.
UNI_USING_NATIVE
)
{
provide
[
'
uni.getCurrentSubNVue
'
]
=
[
path
.
resolve
(
__dirname
,
...
...
packages/vue-cli-plugin-uni/commands/build.js
浏览文件 @
0838eaee
...
...
@@ -64,6 +64,9 @@ function getWebpackConfig (api, args, options) {
})
}
else
{
modifyConfig
(
webpackConfig
,
config
=>
{
if
(
!
config
.
optimization
)
{
config
.
optimization
=
{}
}
config
.
optimization
.
namedModules
=
false
})
}
...
...
@@ -77,11 +80,11 @@ function getWebpackConfigs (api, args, options) {
const
pluginOptions
=
(
options
.
pluginOptions
||
(
options
.
pluginOptions
=
{}))
pluginOptions
[
'
uni-app-plus
'
]
=
{
service
:
true
}
}
options
.
publicPath
=
'
/
'
const
serviceWebpackConfig
=
getWebpackConfig
(
api
,
args
,
options
)
delete
pluginOptions
[
'
uni-app-plus
'
][
'
service
'
]
pluginOptions
[
'
uni-app-plus
'
][
'
view
'
]
=
true
pluginOptions
[
'
uni-app-plus
'
][
'
view
'
]
=
true
options
.
publicPath
=
'
./
'
const
viewWebpackConfig
=
getWebpackConfig
(
api
,
args
,
options
)
return
[
serviceWebpackConfig
,
viewWebpackConfig
]
...
...
packages/vue-cli-plugin-uni/lib/app-plus/index.js
浏览文件 @
0838eaee
...
...
@@ -24,6 +24,7 @@ const {
const
runtimePath
=
'
@dcloudio/uni-mp-weixin/dist/mp.js
'
const
wxsPath
=
'
@dcloudio/uni-mp-weixin/dist/wxs.js
'
const
uniCloudPath
=
path
.
resolve
(
__dirname
,
'
../../packages/uni-cloud/dist/index.js
'
)
function
getProvides
(
isAppService
)
{
if
(
isAppService
)
{
...
...
@@ -35,7 +36,8 @@ function getProvides (isAppService) {
'
Component
'
:
[
runtimePath
,
'
Component
'
],
'
Behavior
'
:
[
runtimePath
,
'
Behavior
'
],
'
getDate
'
:
[
wxsPath
,
'
getDate
'
],
'
getRegExp
'
:
[
wxsPath
,
'
getRegExp
'
]
'
getRegExp
'
:
[
wxsPath
,
'
getRegExp
'
],
'
uniCloud
'
:
[
uniCloudPath
,
'
default
'
]
}
}
return
{
// app-view
...
...
packages/vue-cli-plugin-uni/lib/h5/index.js
浏览文件 @
0838eaee
...
...
@@ -30,9 +30,11 @@ const {
const
runtimePath
=
'
@dcloudio/uni-mp-weixin/dist/mp.js
'
const
wxsPath
=
'
@dcloudio/uni-mp-weixin/dist/wxs.js
'
const
uniCloudPath
=
path
.
resolve
(
__dirname
,
'
../../packages/uni-cloud/dist/index.js
'
)
function
getProvides
()
{
return
{
'
uniCloud
'
:
[
uniCloudPath
,
'
default
'
],
'
wx.nextTick
'
:
[
runtimePath
,
'
nextTick
'
],
'
Page
'
:
[
runtimePath
,
'
Page
'
],
'
Component
'
:
[
runtimePath
,
'
Component
'
],
...
...
@@ -103,7 +105,7 @@ module.exports = {
`import 'uni-pages';import 'uni-
${
process
.
env
.
UNI_PLATFORM
}
';`
const
qihooCode
=
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
?
`
?
`
import 'uni-touch-emulator';
import qh from 'uni-qh';
global.qh = qh;
...
...
@@ -117,7 +119,7 @@ global.onAppShow = function(){};
alias
:
{
'
vue-router
'
:
resolve
(
'
packages/h5-vue-router
'
),
'
uni-h5
'
:
require
.
resolve
(
'
@dcloudio/uni-h5
'
),
'
uni-qh
'
:
path
.
resolve
(
__dirname
,
'
qh-api.js
'
),
'
uni-qh
'
:
path
.
resolve
(
__dirname
,
'
qh-api.js
'
),
'
uni-touch-emulator
'
:
path
.
resolve
(
__dirname
,
'
touch-emulator.js
'
)
}
},
...
...
packages/vue-cli-plugin-uni/lib/mp.js
浏览文件 @
0838eaee
...
...
@@ -27,8 +27,10 @@ function createUniMPPlugin () {
function
getProvides
()
{
const
uniPath
=
require
.
resolve
(
'
@dcloudio/uni-
'
+
process
.
env
.
UNI_PLATFORM
)
const
uniCloudPath
=
path
.
resolve
(
__dirname
,
'
../packages/uni-cloud/dist/index.js
'
)
const
provides
=
{
'
uni
'
:
[
uniPath
,
'
default
'
]
'
uni
'
:
[
uniPath
,
'
default
'
],
'
uniCloud
'
:
[
uniCloudPath
,
'
default
'
]
}
if
(
process
.
env
.
UNI_USING_COMPONENTS
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录