Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MuGuiLin
uni-app
提交
fd9ace41
U
uni-app
项目概览
MuGuiLin
/
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,发现更多精彩内容 >>
提交
fd9ace41
编写于
7月 22, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(h5): hot update
上级
fd0eb655
变更
43
显示空白变更内容
内联
并排
Showing
43 changed file
with
742 addition
and
40 deletion
+742
-40
.eslintrc.js
.eslintrc.js
+1
-1
packages/shims-node.d.ts
packages/shims-node.d.ts
+1
-0
packages/uni-app-vite/src/index.ts
packages/uni-app-vite/src/index.ts
+6
-1
packages/uni-cli-nvue/LICENSE
packages/uni-cli-nvue/LICENSE
+202
-0
packages/uni-cli-nvue/dist/index.js
packages/uni-cli-nvue/dist/index.js
+13
-0
packages/uni-cli-nvue/dist/webpack/config/index.js
packages/uni-cli-nvue/dist/webpack/config/index.js
+22
-0
packages/uni-cli-nvue/dist/webpack/config/optimization.js
packages/uni-cli-nvue/dist/webpack/config/optimization.js
+18
-0
packages/uni-cli-nvue/dist/webpack/config/output.js
packages/uni-cli-nvue/dist/webpack/config/output.js
+7
-0
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
+9
-0
packages/uni-cli-nvue/dist/webpack/config/plugins/define.js
packages/uni-cli-nvue/dist/webpack/config/plugins/define.js
+13
-0
packages/uni-cli-nvue/dist/webpack/config/plugins/index.js
packages/uni-cli-nvue/dist/webpack/config/plugins/index.js
+7
-0
packages/uni-cli-nvue/dist/webpack/config/plugins/provide.js
packages/uni-cli-nvue/dist/webpack/config/plugins/provide.js
+21
-0
packages/uni-cli-nvue/dist/webpack/config/resolve.js
packages/uni-cli-nvue/dist/webpack/config/resolve.js
+32
-0
packages/uni-cli-nvue/dist/webpack/index.js
packages/uni-cli-nvue/dist/webpack/index.js
+37
-0
packages/uni-cli-nvue/lib/get-current-sub-nvue.js
packages/uni-cli-nvue/lib/get-current-sub-nvue.js
+3
-0
packages/uni-cli-nvue/lib/require-native-plugin.js
packages/uni-cli-nvue/lib/require-native-plugin.js
+3
-0
packages/uni-cli-nvue/package.json
packages/uni-cli-nvue/package.json
+29
-0
packages/uni-cli-nvue/src/index.ts
packages/uni-cli-nvue/src/index.ts
+1
-0
packages/uni-cli-nvue/src/webpack/config/index.ts
packages/uni-cli-nvue/src/webpack/config/index.ts
+21
-0
packages/uni-cli-nvue/src/webpack/config/optimization.ts
packages/uni-cli-nvue/src/webpack/config/optimization.ts
+14
-0
packages/uni-cli-nvue/src/webpack/config/output.ts
packages/uni-cli-nvue/src/webpack/config/output.ts
+6
-0
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
+7
-0
packages/uni-cli-nvue/src/webpack/config/plugins/define.ts
packages/uni-cli-nvue/src/webpack/config/plugins/define.ts
+13
-0
packages/uni-cli-nvue/src/webpack/config/plugins/index.ts
packages/uni-cli-nvue/src/webpack/config/plugins/index.ts
+5
-0
packages/uni-cli-nvue/src/webpack/config/plugins/provide.ts
packages/uni-cli-nvue/src/webpack/config/plugins/provide.ts
+22
-0
packages/uni-cli-nvue/src/webpack/config/resolve.ts
packages/uni-cli-nvue/src/webpack/config/resolve.ts
+29
-0
packages/uni-cli-nvue/src/webpack/index.ts
packages/uni-cli-nvue/src/webpack/index.ts
+35
-0
packages/uni-cli-nvue/tsconfig.json
packages/uni-cli-nvue/tsconfig.json
+12
-0
packages/uni-cli-shared/src/hbx/alias.ts
packages/uni-cli-shared/src/hbx/alias.ts
+51
-0
packages/uni-cli-shared/src/hbx/env.ts
packages/uni-cli-shared/src/hbx/env.ts
+20
-0
packages/uni-cli-shared/src/hbx/index.ts
packages/uni-cli-shared/src/hbx/index.ts
+2
-22
packages/uni-cli-shared/src/index.ts
packages/uni-cli-shared/src/index.ts
+1
-0
packages/uni-cli-shared/src/logs/format.ts
packages/uni-cli-shared/src/logs/format.ts
+21
-0
packages/uni-cli-shared/src/logs/index.ts
packages/uni-cli-shared/src/logs/index.ts
+1
-0
packages/uni-h5-vite/dist/handleHotUpdate/index.js
packages/uni-h5-vite/dist/handleHotUpdate/index.js
+4
-5
packages/uni-h5-vite/dist/plugins/cssScoped.js
packages/uni-h5-vite/dist/plugins/cssScoped.js
+3
-0
packages/uni-h5-vite/src/handleHotUpdate/index.ts
packages/uni-h5-vite/src/handleHotUpdate/index.ts
+4
-5
packages/uni-h5-vite/src/plugins/cssScoped.ts
packages/uni-h5-vite/src/plugins/cssScoped.ts
+3
-0
packages/vite-plugin-uni/src/cli/action.ts
packages/vite-plugin-uni/src/cli/action.ts
+23
-2
packages/vite-plugin-uni/src/cli/utils.ts
packages/vite-plugin-uni/src/cli/utils.ts
+5
-2
packages/vite-plugin-uni/src/configResolved/index.ts
packages/vite-plugin-uni/src/configResolved/index.ts
+10
-2
packages/vite-plugin-uni/src/index.ts
packages/vite-plugin-uni/src/index.ts
+4
-0
scripts/utils.js
scripts/utils.js
+1
-0
未找到文件。
.eslintrc.js
浏览文件 @
fd9ace41
...
...
@@ -44,7 +44,7 @@ module.exports = {
// Packages targeting Node
{
files
:
[
'
packages/{uni-cli-shared,uni-app-vite,uni-h5-vite,vite-plugin-uni}/**
'
,
'
packages/{uni-cli-shared,uni-
cli-nvue,uni-
app-vite,uni-h5-vite,vite-plugin-uni}/**
'
,
'
packages/*/vite.config.ts
'
,
],
rules
:
{
...
...
packages/shims-node.d.ts
浏览文件 @
fd9ace41
...
...
@@ -5,5 +5,6 @@ declare namespace NodeJS {
UNI_OUTPUT_DIR
:
string
UNI_CLI_CONTEXT
:
string
UNI_COMPILER_VERSION
:
string
UNI_HBUILDERX_PLUGINS
:
string
}
}
packages/uni-app-vite/src/index.ts
浏览文件 @
fd9ace41
import
fs
from
'
fs
'
import
{
uniCssPlugin
}
from
'
@dcloudio/uni-cli-shared
'
import
{
initProvide
,
uniCssPlugin
,
uniViteInjectPlugin
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
UniAppPlugin
}
from
'
./plugin
'
import
{
uniCopyPlugin
}
from
'
./plugins/copy
'
import
{
uniMainJsPlugin
}
from
'
./plugins/mainJs
'
...
...
@@ -13,6 +17,7 @@ const plugins = [
uniMainJsPlugin
(),
uniManifestJsonPlugin
(),
uniPagesJsonPlugin
(),
uniViteInjectPlugin
(
initProvide
()),
UniAppPlugin
,
]
if
(
!
process
.
env
.
UNI_APP_CODE_SPLITING
)
{
...
...
packages/uni-cli-nvue/LICENSE
0 → 100755
浏览文件 @
fd9ace41
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
packages/uni-cli-nvue/dist/index.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
var
__createBinding
=
(
this
&&
this
.
__createBinding
)
||
(
Object
.
create
?
(
function
(
o
,
m
,
k
,
k2
)
{
if
(
k2
===
undefined
)
k2
=
k
;
Object
.
defineProperty
(
o
,
k2
,
{
enumerable
:
true
,
get
:
function
()
{
return
m
[
k
];
}
});
})
:
(
function
(
o
,
m
,
k
,
k2
)
{
if
(
k2
===
undefined
)
k2
=
k
;
o
[
k2
]
=
m
[
k
];
}));
var
__exportStar
=
(
this
&&
this
.
__exportStar
)
||
function
(
m
,
exports
)
{
for
(
var
p
in
m
)
if
(
p
!==
"
default
"
&&
!
Object
.
prototype
.
hasOwnProperty
.
call
(
exports
,
p
))
__createBinding
(
exports
,
m
,
p
);
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
__exportStar
(
require
(
"
./webpack
"
),
exports
);
packages/uni-cli-nvue/dist/webpack/config/index.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
createConfig
=
void
0
;
const
optimization_1
=
require
(
"
./optimization
"
);
const
output_1
=
require
(
"
./output
"
);
function
createConfig
(
mode
)
{
return
{
target
:
'
node
'
,
mode
:
mode
,
devtool
:
false
,
watch
:
mode
===
'
development
'
,
entry
()
{
return
{};
},
externals
:
{
vue
:
'
Vue
'
,
},
optimization
:
optimization_1
.
optimization
,
output
:
output_1
.
output
,
};
}
exports
.
createConfig
=
createConfig
;
packages/uni-cli-nvue/dist/webpack/config/optimization.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
optimization
=
void
0
;
const
terser_webpack_plugin_1
=
__importDefault
(
require
(
"
terser-webpack-plugin
"
));
exports
.
optimization
=
{
minimizer
:
[
new
terser_webpack_plugin_1
.
default
({
terserOptions
:
{
output
:
{
ascii_only
:
true
,
},
},
}),
],
};
packages/uni-cli-nvue/dist/webpack/config/output.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
output
=
void
0
;
exports
.
output
=
{
path
:
process
.
env
.
UNI_OUTPUT_DIR
,
filename
:
'
[name].js
'
,
};
packages/uni-cli-nvue/dist/webpack/config/plugins/banner.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
banner
=
void
0
;
const
webpack_1
=
require
(
"
webpack
"
);
exports
.
banner
=
new
webpack_1
.
BannerPlugin
({
banner
:
'
"use weex:vue";
'
,
raw
:
true
,
exclude
:
'
Vue
'
,
});
packages/uni-cli-nvue/dist/webpack/config/plugins/define.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
define
=
void
0
;
const
webpack_1
=
require
(
"
webpack
"
);
exports
.
define
=
new
webpack_1
.
DefinePlugin
({
'
process.env
'
:
{
NODE_ENV
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
),
VUE_APP_PLATFORM
:
JSON
.
stringify
(
process
.
env
.
UNI_PLATFORM
),
UNI_CLOUD_PROVIDER
:
process
.
env
.
UNI_CLOUD_PROVIDER
,
HBX_USER_TOKEN
:
JSON
.
stringify
(
process
.
env
.
HBX_USER_TOKEN
||
''
),
UNI_AUTOMATOR_WS_ENDPOINT
:
JSON
.
stringify
(
process
.
env
.
UNI_AUTOMATOR_WS_ENDPOINT
),
},
});
packages/uni-cli-nvue/dist/webpack/config/plugins/index.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
plugins
=
void
0
;
const
define_1
=
require
(
"
./define
"
);
const
banner_1
=
require
(
"
./banner
"
);
const
provide_1
=
require
(
"
./provide
"
);
exports
.
plugins
=
[
define_1
.
define
,
banner_1
.
banner
,
provide_1
.
provide
];
packages/uni-cli-nvue/dist/webpack/config/plugins/provide.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
provide
=
void
0
;
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
webpack_1
=
require
(
"
webpack
"
);
const
uni_cli_shared_1
=
require
(
"
@dcloudio/uni-cli-shared
"
);
const
libDir
=
path_1
.
default
.
resolve
(
__dirname
,
'
../../../../lib
'
);
const
definitions
=
Object
.
assign
({
uniCloud
:
[
require
.
resolve
(
'
@dcloudio/uni-cloud/dist/uni-cloud.es.js
'
),
'
default
'
,
],
'
uni.getCurrentSubNVue
'
:
[
path_1
.
default
.
join
(
libDir
,
'
get-current-sub-nvue.js
'
),
'
default
'
,
],
'
uni.requireNativePlugin
'
:
[
path_1
.
default
.
join
(
libDir
,
'
require-native-plugin.js
'
),
'
default
'
,
]
},
uni_cli_shared_1
.
initProvide
());
exports
.
provide
=
new
webpack_1
.
ProvidePlugin
(
definitions
);
packages/uni-cli-nvue/dist/webpack/config/resolve.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
resolve
=
void
0
;
const
path_1
=
__importDefault
(
require
(
"
path
"
));
const
uni_cli_shared_1
=
require
(
"
@dcloudio/uni-cli-shared
"
);
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
;
exports
.
resolve
=
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
'
uni-pages
'
:
path_1
.
default
.
resolve
(
inputDir
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-app-style
'
:
uni_cli_shared_1
.
resolveMainPathOnce
(
inputDir
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
appStyle
'
,
}),
'
uni-stat-config
'
:
path_1
.
default
.
resolve
(
inputDir
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
stat
'
,
}),
},
modules
:
[
'
node_modules
'
,
path_1
.
default
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path_1
.
default
.
resolve
(
inputDir
,
'
node_modules
'
),
],
};
packages/uni-cli-nvue/dist/webpack/index.js
0 → 100644
浏览文件 @
fd9ace41
"
use strict
"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"
default
"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"
__esModule
"
,
{
value
:
true
});
exports
.
runWebpackDev
=
exports
.
runWebpackBuild
=
void
0
;
const
webpack_1
=
__importDefault
(
require
(
"
webpack
"
));
const
config_1
=
require
(
"
./config
"
);
function
runWebpack
(
mode
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
webpack_1
.
default
(
config_1
.
createConfig
(
mode
),
(
err
,
stats
)
=>
{
if
(
err
)
{
return
reject
(
err
.
stack
||
err
);
}
if
(
stats
.
hasErrors
())
{
return
reject
(
stats
.
toString
());
}
const
info
=
stats
.
toJson
();
if
(
stats
.
hasWarnings
())
{
console
.
warn
(
info
.
warnings
);
}
console
.
log
(
stats
.
toString
({
chunks
:
true
,
colors
:
true
,
// 在控制台展示颜色
}));
resolve
(
void
0
);
});
});
}
function
runWebpackBuild
()
{
return
runWebpack
(
'
production
'
);
}
exports
.
runWebpackBuild
=
runWebpackBuild
;
function
runWebpackDev
()
{
return
runWebpack
(
'
development
'
);
}
exports
.
runWebpackDev
=
runWebpackDev
;
packages/uni-cli-nvue/lib/get-current-sub-nvue.js
0 → 100644
浏览文件 @
fd9ace41
export
default
function
getCurrentSubNVue
()
{
return
uni
.
getSubNVueById
(
plus
.
webview
.
currentWebview
().
id
)
}
packages/uni-cli-nvue/lib/require-native-plugin.js
0 → 100644
浏览文件 @
fd9ace41
export
default
function
requireNativePlugin
(
name
)
{
return
weex
.
requireModule
(
name
)
}
packages/uni-cli-nvue/package.json
0 → 100644
浏览文件 @
fd9ace41
{
"name"
:
"@dcloudio/uni-cli-nvue"
,
"version"
:
"3.0.0-alpha-3000020210720001"
,
"description"
:
"uni-cli-nvue"
,
"main"
:
"dist/index.js"
,
"types"
:
"dist/index.d.ts"
,
"files"
:
[
"dist/**/*.js"
,
"dist/**/*.d.ts"
,
"lib"
],
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
"directory"
:
"packages/uni-cli-nvue"
},
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"license"
:
"Apache-2.0"
,
"gitHead"
:
"56deaeb47d42e924d10282d7af418ccee6b139bf"
,
"dependencies"
:
{
"terser-webpack-plugin"
:
"^5.1.4"
,
"webpack"
:
"^5.45.1"
},
"devDependencies"
:
{
"@types/terser-webpack-plugin"
:
"^5.0.4"
}
}
packages/uni-cli-nvue/src/index.ts
0 → 100644
浏览文件 @
fd9ace41
export
*
from
'
./webpack
'
packages/uni-cli-nvue/src/webpack/config/index.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
Configuration
}
from
'
webpack
'
import
{
optimization
}
from
'
./optimization
'
import
{
output
}
from
'
./output
'
export
function
createConfig
(
mode
:
'
production
'
|
'
development
'
):
Configuration
{
return
{
target
:
'
node
'
,
mode
:
mode
,
devtool
:
false
,
watch
:
mode
===
'
development
'
,
entry
()
{
return
{}
},
externals
:
{
vue
:
'
Vue
'
,
},
optimization
,
output
,
}
}
packages/uni-cli-nvue/src/webpack/config/optimization.ts
0 → 100644
浏览文件 @
fd9ace41
import
TerserPlugin
from
'
terser-webpack-plugin
'
import
{
Configuration
}
from
'
webpack
'
export
const
optimization
:
Configuration
[
'
optimization
'
]
=
{
minimizer
:
[
new
TerserPlugin
({
terserOptions
:
{
output
:
{
ascii_only
:
true
,
},
},
}),
],
}
packages/uni-cli-nvue/src/webpack/config/output.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
Configuration
}
from
'
webpack
'
export
const
output
:
Configuration
[
'
output
'
]
=
{
path
:
process
.
env
.
UNI_OUTPUT_DIR
,
filename
:
'
[name].js
'
,
}
packages/uni-cli-nvue/src/webpack/config/plugins/banner.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
BannerPlugin
}
from
'
webpack
'
export
const
banner
=
new
BannerPlugin
({
banner
:
'
"use weex:vue";
'
,
raw
:
true
,
exclude
:
'
Vue
'
,
})
packages/uni-cli-nvue/src/webpack/config/plugins/define.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
DefinePlugin
}
from
'
webpack
'
export
const
define
=
new
DefinePlugin
({
'
process.env
'
:
{
NODE_ENV
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
),
VUE_APP_PLATFORM
:
JSON
.
stringify
(
process
.
env
.
UNI_PLATFORM
),
UNI_CLOUD_PROVIDER
:
process
.
env
.
UNI_CLOUD_PROVIDER
,
HBX_USER_TOKEN
:
JSON
.
stringify
(
process
.
env
.
HBX_USER_TOKEN
||
''
),
UNI_AUTOMATOR_WS_ENDPOINT
:
JSON
.
stringify
(
process
.
env
.
UNI_AUTOMATOR_WS_ENDPOINT
),
},
})
packages/uni-cli-nvue/src/webpack/config/plugins/index.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
Configuration
}
from
'
webpack
'
import
{
define
}
from
'
./define
'
import
{
banner
}
from
'
./banner
'
import
{
provide
}
from
'
./provide
'
export
const
plugins
:
Configuration
[
'
plugins
'
]
=
[
define
,
banner
,
provide
]
packages/uni-cli-nvue/src/webpack/config/plugins/provide.ts
0 → 100644
浏览文件 @
fd9ace41
import
path
from
'
path
'
import
{
ProvidePlugin
}
from
'
webpack
'
import
{
initProvide
}
from
'
@dcloudio/uni-cli-shared
'
const
libDir
=
path
.
resolve
(
__dirname
,
'
../../../../lib
'
)
const
definitions
:
Record
<
string
,
string
|
string
[]
>
=
{
uniCloud
:
[
require
.
resolve
(
'
@dcloudio/uni-cloud/dist/uni-cloud.es.js
'
),
'
default
'
,
],
'
uni.getCurrentSubNVue
'
:
[
path
.
join
(
libDir
,
'
get-current-sub-nvue.js
'
),
'
default
'
,
],
'
uni.requireNativePlugin
'
:
[
path
.
join
(
libDir
,
'
require-native-plugin.js
'
),
'
default
'
,
],
...
initProvide
(),
}
export
const
provide
=
new
ProvidePlugin
(
definitions
)
packages/uni-cli-nvue/src/webpack/config/resolve.ts
0 → 100644
浏览文件 @
fd9ace41
import
path
from
'
path
'
import
{
Configuration
}
from
'
webpack
'
import
{
resolveMainPathOnce
}
from
'
@dcloudio/uni-cli-shared
'
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
export
const
resolve
:
Configuration
[
'
resolve
'
]
=
{
extensions
:
[
'
.js
'
,
'
.nvue
'
,
'
.vue
'
,
'
.json
'
],
alias
:
{
'
@
'
:
inputDir
,
'
uni-pages
'
:
path
.
resolve
(
inputDir
,
'
pages.json
'
),
'
@dcloudio/uni-stat
'
:
require
.
resolve
(
'
@dcloudio/uni-stat
'
),
'
uni-app-style
'
:
resolveMainPathOnce
(
inputDir
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
appStyle
'
,
}),
'
uni-stat-config
'
:
path
.
resolve
(
inputDir
,
'
pages.json
'
)
+
'
?
'
+
JSON
.
stringify
({
type
:
'
stat
'
,
}),
},
modules
:
[
'
node_modules
'
,
path
.
resolve
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
node_modules
'
),
path
.
resolve
(
inputDir
,
'
node_modules
'
),
],
}
packages/uni-cli-nvue/src/webpack/index.ts
0 → 100644
浏览文件 @
fd9ace41
import
webpack
from
'
webpack
'
import
{
createConfig
}
from
'
./config
'
function
runWebpack
(
mode
:
'
production
'
|
'
development
'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
webpack
(
createConfig
(
mode
),
(
err
,
stats
)
=>
{
if
(
err
)
{
return
reject
(
err
.
stack
||
err
)
}
if
(
stats
!
.
hasErrors
())
{
return
reject
(
stats
!
.
toString
())
}
const
info
=
stats
!
.
toJson
()
if
(
stats
!
.
hasWarnings
())
{
console
.
warn
(
info
.
warnings
)
}
console
.
log
(
stats
!
.
toString
({
chunks
:
true
,
// 使构建过程更静默无输出
colors
:
true
,
// 在控制台展示颜色
})
)
resolve
(
void
0
)
})
})
}
export
function
runWebpackBuild
()
{
return
runWebpack
(
'
production
'
)
}
export
function
runWebpackDev
()
{
return
runWebpack
(
'
development
'
)
}
packages/uni-cli-nvue/tsconfig.json
0 → 100644
浏览文件 @
fd9ace41
{
"extends"
:
"../../tsconfig.node.json"
,
"compilerOptions"
:
{
"outDir"
:
"dist"
},
"include"
:
[
"src"
,
"types/shims.d.ts"
,
"../shims-node.d.ts"
,
"../shims-uni-app.d.ts"
]
}
packages/uni-cli-shared/src/hbx/alias.ts
0 → 100644
浏览文件 @
fd9ace41
import
path
from
'
path
'
import
moduleAlias
from
'
module-alias
'
import
{
isInHBuilderX
}
from
'
./env
'
import
type
{
Formatter
}
from
'
../logs/format
'
const
hbxPlugins
=
{
// typescript: 'compile-typescript/node_modules/typescript',
less
:
'
compile-less/node_modules/less
'
,
sass
:
'
compile-dart-sass/node_modules/sass
'
,
stylus
:
'
compile-stylus/node_modules/stylus
'
,
// pug: 'compile-pug-cli/node_modules/pug',
}
as
const
export
function
initModuleAlias
()
{
if
(
isInHBuilderX
())
{
Object
.
keys
(
hbxPlugins
).
forEach
((
name
)
=>
{
moduleAlias
.
addAlias
(
name
,
path
.
resolve
(
process
.
env
.
UNI_HBUILDERX_PLUGINS
,
hbxPlugins
[
name
as
keyof
typeof
hbxPlugins
]
)
)
})
}
}
export
const
moduleAliasFormatter
:
Formatter
=
{
test
(
msg
)
{
return
msg
.
includes
(
'
Preprocessor dependency
'
)
},
format
(
msg
)
{
let
lang
=
''
let
preprocessor
=
''
if
(
msg
.
includes
(
`"sass"`
))
{
lang
=
'
sass
'
preprocessor
=
'
compile-dart-sass
'
}
else
if
(
msg
.
includes
(
`"less"`
))
{
lang
=
'
less
'
preprocessor
=
'
compile-less
'
}
else
if
(
msg
.
includes
(
'
"stylus"
'
))
{
lang
=
'
stylus
'
preprocessor
=
'
compile-stylus
'
}
if
(
lang
)
{
return
`预编译器错误:代码使用了
${
lang
}
语言,但未安装相应的编译器插件,请前往插件市场安装该插件:
https://ext.dcloud.net.cn/plugin?name=
${
preprocessor
}
`
}
return
msg
},
}
packages/uni-cli-shared/src/hbx/env.ts
0 → 100644
浏览文件 @
fd9ace41
import
path
from
'
path
'
import
{
once
}
from
'
@dcloudio/uni-shared
'
export
const
isInHBuilderX
=
once
(()
=>
{
const
{
UNI_HBUILDERX_PLUGINS
}
=
process
.
env
try
{
const
{
name
}
=
require
(
path
.
resolve
(
UNI_HBUILDERX_PLUGINS
,
'
about/package.json
'
))
return
name
===
'
about
'
}
catch
(
e
)
{
// console.error(e)
}
return
false
})
export
const
runByHBuilderX
=
once
(()
=>
{
return
!!
process
.
env
.
UNI_HBUILDERX_PLUGINS
})
packages/uni-cli-shared/src/hbx/index.ts
浏览文件 @
fd9ace41
import
path
from
'
path
'
import
{
once
}
from
'
@dcloudio/uni-shared
'
process
.
env
.
UNI_HBUILDERX_PLUGINS
=
process
.
env
.
UNI_HBUILDERX_PLUGINS
||
path
.
resolve
(
__dirname
,
'
../../../../../../
'
)
export
const
isInHBuilderX
=
once
(()
=>
{
const
{
UNI_HBUILDERX_PLUGINS
}
=
process
.
env
if
(
!
UNI_HBUILDERX_PLUGINS
)
{
return
false
}
try
{
const
{
name
}
=
require
(
path
.
resolve
(
UNI_HBUILDERX_PLUGINS
,
'
about/package.json
'
))
return
name
===
'
about
'
}
catch
(
e
)
{
// console.error(e)
}
return
false
})
export
const
runByHBuilderX
=
once
(()
=>
{
return
!!
process
.
env
.
UNI_HBUILDERX_PLUGINS
})
export
*
from
'
./env
'
export
{
initModuleAlias
}
from
'
./alias
'
packages/uni-cli-shared/src/index.ts
浏览文件 @
fd9ace41
export
*
from
'
./hbx
'
export
*
from
'
./logs
'
export
*
from
'
./ssr
'
export
*
from
'
./deps
'
export
*
from
'
./json
'
...
...
packages/uni-cli-shared/src/logs/format.ts
0 → 100644
浏览文件 @
fd9ace41
import
{
isInHBuilderX
}
from
'
../hbx/env
'
import
{
moduleAliasFormatter
}
from
'
../hbx/alias
'
export
interface
Formatter
{
test
:
(
msg
:
string
)
=>
boolean
format
:
(
msg
:
string
)
=>
string
}
const
formatters
:
Formatter
[]
=
[]
if
(
isInHBuilderX
())
{
formatters
.
push
(
moduleAliasFormatter
)
}
export
function
formatMsg
(
msg
:
string
)
{
const
formatter
=
formatters
.
find
(({
test
})
=>
test
(
msg
))
if
(
formatter
)
{
return
formatter
.
format
(
msg
)
}
return
msg
}
packages/uni-cli-shared/src/logs/index.ts
0 → 100644
浏览文件 @
fd9ace41
export
{
formatMsg
}
from
'
./format
'
packages/uni-h5-vite/dist/handleHotUpdate/index.js
浏览文件 @
fd9ace41
...
...
@@ -56,11 +56,6 @@ function createHandleHotUpdate() {
return
;
}
debugHmr
(
file
);
server
.
ws
.
send
({
type
:
'
custom
'
,
event
:
'
invalidate
'
,
data
:
{},
});
const
pagesJson
=
uni_cli_shared_1
.
parsePagesJson
(
inputDir
,
platform
);
// 更新define
const
{
define
,
server
:
{
middlewareMode
},
}
=
server
.
config
;
...
...
@@ -84,6 +79,10 @@ function createHandleHotUpdate() {
for
(
const
file
of
invalidateFiles
)
{
yield
invalidate
(
file
,
server
.
moduleGraph
);
}
server
.
ws
.
send
({
type
:
'
full-reload
'
,
path
:
'
*
'
,
});
return
[];
});
};
...
...
packages/uni-h5-vite/dist/plugins/cssScoped.js
浏览文件 @
fd9ace41
...
...
@@ -48,6 +48,9 @@ function uniCssScopedPlugin() {
if
(
!
uni_cli_shared_1
.
EXTNAME_VUE
.
includes
(
path_1
.
default
.
extname
(
ctx
.
file
)))
{
return
;
}
if
(
ctx
.
file
.
endsWith
(
'
App.vue
'
))
{
return
;
}
debugScoped
(
'
hmr
'
,
ctx
.
file
);
const
oldRead
=
ctx
.
read
;
ctx
.
read
=
()
=>
__awaiter
(
this
,
void
0
,
void
0
,
function
*
()
{
...
...
packages/uni-h5-vite/src/handleHotUpdate/index.ts
浏览文件 @
fd9ace41
...
...
@@ -44,11 +44,6 @@ export function createHandleHotUpdate(): Plugin['handleHotUpdate'] {
return
}
debugHmr
(
file
)
server
.
ws
.
send
({
type
:
'
custom
'
,
event
:
'
invalidate
'
,
data
:
{},
})
const
pagesJson
=
parsePagesJson
(
inputDir
,
platform
)
// 更新define
const
{
...
...
@@ -83,6 +78,10 @@ export function createHandleHotUpdate(): Plugin['handleHotUpdate'] {
for
(
const
file
of
invalidateFiles
)
{
await
invalidate
(
file
,
server
.
moduleGraph
)
}
server
.
ws
.
send
({
type
:
'
full-reload
'
,
path
:
'
*
'
,
})
return
[]
}
}
...
...
packages/uni-h5-vite/src/plugins/cssScoped.ts
浏览文件 @
fd9ace41
...
...
@@ -39,6 +39,9 @@ export function uniCssScopedPlugin(): Plugin {
if
(
!
EXTNAME_VUE
.
includes
(
path
.
extname
(
ctx
.
file
)))
{
return
}
if
(
ctx
.
file
.
endsWith
(
'
App.vue
'
))
{
return
}
debugScoped
(
'
hmr
'
,
ctx
.
file
)
const
oldRead
=
ctx
.
read
ctx
.
read
=
async
()
=>
{
...
...
packages/vite-plugin-uni/src/cli/action.ts
浏览文件 @
fd9ace41
...
...
@@ -5,6 +5,21 @@ import { build, buildSSR } from './build'
import
{
createServer
,
createSSRServer
}
from
'
./server
'
import
{
initEnv
}
from
'
./utils
'
async
function
runNVue
(
mode
:
'
prod
'
|
'
dev
'
)
{
let
nvue
try
{
nvue
=
require
(
'
@dcloudio/uni-cli-nvue
'
)
}
catch
(
e
)
{}
if
(
!
nvue
)
{
return
}
if
(
mode
===
'
prod
'
)
{
await
nvue
.
runWebpackBuild
()
}
else
{
await
nvue
.
runWebpackDev
()
}
}
export
async
function
runDev
(
options
:
CliOptions
&
ServerOptions
)
{
initEnv
(
'
dev
'
,
options
)
try
{
...
...
@@ -13,8 +28,11 @@ export async function runDev(options: CliOptions & ServerOptions) {
}
else
{
await
build
(
extend
(
options
,
{
watch
:
true
}))
}
if
(
options
.
platform
===
'
app
'
)
{
await
runNVue
(
'
prod
'
)
}
}
catch
(
e
)
{
console
.
error
(
`error when starting dev server:\n
${
e
.
stack
}
`
)
console
.
error
(
`error when starting dev server:\n
${
e
.
stack
||
e
}
`
)
process
.
exit
(
1
)
}
}
...
...
@@ -25,9 +43,12 @@ export async function runBuild(options: CliOptions & BuildOptions) {
await
(
options
.
ssr
&&
options
.
platform
===
'
h5
'
?
buildSSR
(
options
)
:
build
(
options
))
if
(
options
.
platform
===
'
app
'
)
{
await
runNVue
(
'
dev
'
)
}
console
.
log
(
` DONE Build complete.`
)
}
catch
(
e
)
{
console
.
error
(
`error during build:\n
${
e
.
stack
}
`
)
console
.
error
(
`error during build:\n
${
e
.
stack
||
e
}
`
)
process
.
exit
(
1
)
}
}
packages/vite-plugin-uni/src/cli/utils.ts
浏览文件 @
fd9ace41
...
...
@@ -64,7 +64,8 @@ export function initEnv(type: 'dev' | 'build', options: CliOptions) {
;(
options
as
BuildOptions
).
outDir
=
process
.
env
.
UNI_OUTPUT_DIR
}
else
{
if
(
!
(
options
as
BuildOptions
).
outDir
)
{
;(
options
as
BuildOptions
).
outDir
=
path
.
join
(
;(
options
as
BuildOptions
).
outDir
=
path
.
resolve
(
process
.
cwd
(),
'
dist
'
,
process
.
env
.
NODE_ENV
===
'
production
'
?
'
build
'
:
'
dev
'
,
process
.
env
.
UNI_PLATFORM
...
...
@@ -75,7 +76,9 @@ export function initEnv(type: 'dev' | 'build', options: CliOptions) {
// tips
if
(
isInHBuilderX
()
&&
options
.
platform
===
'
app
'
)
{
return
(
console
.
error
(
`Vue3 目前暂不支持编译至 App 端,近期将升级支持。`
),
console
.
error
(
`当前项目 Vue 版本为3,暂不支持编译至 App 端,近期将升级支持。`
),
process
.
exit
(
1
)
)
}
...
...
packages/vite-plugin-uni/src/configResolved/index.ts
浏览文件 @
fd9ace41
import
{
Plugin
}
from
'
vite
'
import
{
checkUpdate
}
from
'
@dcloudio/uni-cli-shared
'
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
formatMsg
,
checkUpdate
}
from
'
@dcloudio/uni-cli-shared
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
import
{
initEnv
}
from
'
./env
'
...
...
@@ -9,6 +9,7 @@ import { initPlugins } from './plugins'
export
function
createConfigResolved
(
options
:
VitePluginUniResolvedOptions
)
{
return
((
config
)
=>
{
initEnv
(
config
)
initLogger
(
config
)
initOptions
(
options
,
config
)
initPlugins
(
config
,
options
)
initCheckUpdate
()
...
...
@@ -24,3 +25,10 @@ function initCheckUpdate() {
versionType
:
pkg
.
version
.
includes
(
'
alpha
'
)
?
'
a
'
:
'
r
'
,
})
}
function
initLogger
({
logger
}:
ResolvedConfig
)
{
const
{
error
}
=
logger
logger
.
error
=
(
msg
,
opts
)
=>
{
return
error
(
formatMsg
(
msg
),
opts
)
}
}
packages/vite-plugin-uni/src/index.ts
浏览文件 @
fd9ace41
...
...
@@ -6,6 +6,8 @@ import { VueJSXPluginOptions } from '@vue/babel-plugin-jsx'
import
VueJsxPlugin
from
'
@vitejs/plugin-vue-jsx
'
import
ViteLegacyPlugin
from
'
@vitejs/plugin-legacy
'
import
{
initModuleAlias
}
from
'
@dcloudio/uni-cli-shared
'
import
{
createConfig
}
from
'
./config
'
import
{
createConfigResolved
}
from
'
./configResolved
'
import
{
createConfigureServer
}
from
'
./configureServer
'
...
...
@@ -15,6 +17,8 @@ const debugUni = debug('vite:uni:plugin')
const
pkg
=
require
(
'
@dcloudio/vite-plugin-uni/package.json
'
)
initModuleAlias
()
process
.
env
.
UNI_COMPILER_VERSION
=
pkg
[
'
uni-app
'
]?.[
'
compilerVersion
'
]
||
''
export
interface
VitePluginUniOptions
{
...
...
scripts/utils.js
浏览文件 @
fd9ace41
...
...
@@ -14,6 +14,7 @@ const priority = {
'
uni-mp-weixin
'
:
70
,
'
uni-quickapp-webview
'
:
70
,
'
uni-cli-shared
'
:
60
,
'
uni-cli-nvue
'
:
55
,
'
uni-h5
'
:
50
,
'
uni-h5-vite
'
:
40
,
'
uni-app-vue
'
:
35
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录