提交 6f687349 编写于 作者: fxy060608's avatar fxy060608

fix(app-plus): wxcomponents (https://ask.dcloud.net.cn/question/77358)

上级 31d00592
......@@ -79,7 +79,7 @@ const PLATFORMS = {
exts: false,
vue: '@dcloudio/vue-cli-plugin-uni/packages/h5-vue',
compiler: false,
megalo: false,
megalo: false,
filterTag: 'wxs',
subPackages: false,
cssVars: {
......@@ -124,11 +124,15 @@ const PLATFORMS = {
assetsDir
}) {
const files = ['hybrid/html']
let wxcomponents = []
if (!process.env.UNI_USING_NATIVE) {
files.push('wxcomponents')
wxcomponents = getCopyOptions(['wxcomponents'], {
to: path.resolve(process.env.UNI_OUTPUT_TMP_DIR, 'wxcomponents')
})
}
return [
...getStaticCopyOptions(assetsDir),
...wxcomponents,
...getCopyOptions(files)
]
}
......@@ -399,19 +403,19 @@ function devtoolModuleFilenameTemplate (info) {
) {
return `uni-app:///${filePath}`
}
}
const NODE_MODULES_REGEX = /(\.\.\/)?node_modules/g
}
const NODE_MODULES_REGEX = /(\.\.\/)?node_modules/g
function normalizeNodeModules (str) {
str = str.replace(NODE_MODULES_REGEX, 'node-modules')
if (process.env.UNI_PLATFORM === 'mp-alipay') {
str = str.replace('node-modules/@', 'node-modules/npm-scope-')
}
return str
}
}
module.exports = {
module.exports = {
normalizeNodeModules,
isInHBuilderX,
isInHBuilderXAlpha,
......
{
"name": "@dcloudio/uni-cli-shared",
"version": "0.2.990",
"version": "0.2.991",
"description": "uni-cli-shared",
"main": "lib/index.js",
"files": [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册