@dcloudio/vue-cli-plugin-hbuilderx 2.0.2-4040520250103001 → 2.0.2-4050320250303001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/module-alias.js
CHANGED
|
@@ -22,7 +22,9 @@ if (isInHBuilderX) {
|
|
|
22
22
|
moduleAlias.addAlias('less', path.resolve(process.env.UNI_HBUILDERX_PLUGINS,
|
|
23
23
|
'compile-less/node_modules/less'))
|
|
24
24
|
moduleAlias.addAlias('node-sass', path.resolve(process.env.UNI_HBUILDERX_PLUGINS,
|
|
25
|
-
'compile-node-sass/node_modules/node-sass-china'))
|
|
25
|
+
'compile-node-sass/node_modules/node-sass-china'))
|
|
26
|
+
moduleAlias.addAlias('sass', path.resolve(process.env.UNI_HBUILDERX_PLUGINS,
|
|
27
|
+
'compile-dart-sass/node_modules/sass'))
|
|
26
28
|
moduleAlias.addAlias('stylus', path.resolve(process.env.UNI_HBUILDERX_PLUGINS,
|
|
27
29
|
'compile-stylus/node_modules/stylus'))
|
|
28
30
|
moduleAlias.addAlias('pug', path.resolve(process.env.UNI_HBUILDERX_PLUGINS,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/vue-cli-plugin-hbuilderx",
|
|
3
|
-
"version": "2.0.2-
|
|
3
|
+
"version": "2.0.2-4050320250303001",
|
|
4
4
|
"description": "HBuilderX plugin for vue-cli 3",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -18,5 +18,5 @@
|
|
|
18
18
|
"css": "~2.2.1",
|
|
19
19
|
"escodegen": "^1.8.1"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "a2b65079c08db2a886090289a98e78eb4680e3e7"
|
|
22
22
|
}
|
|
@@ -38,7 +38,9 @@ module.exports = function ({
|
|
|
38
38
|
value: ` at ${normalizePath(file)}:${path.node.loc.start.line}`
|
|
39
39
|
})
|
|
40
40
|
args.unshift(t.stringLiteral(path.node.callee.property.name))
|
|
41
|
-
|
|
41
|
+
const expr = opts && opts.isUniConsole ? t.memberExpression(t.identifier('uni'), t.identifier(
|
|
42
|
+
FORMAT_LOG)) : t.identifier(FORMAT_LOG)
|
|
43
|
+
path.replaceWith(t.callExpression(expr, args))
|
|
42
44
|
// path.node.arguments = [
|
|
43
45
|
// t.callExpression(
|
|
44
46
|
// t.identifier(FORMAT_LOG),
|
|
@@ -13,7 +13,8 @@ const {
|
|
|
13
13
|
|
|
14
14
|
const {
|
|
15
15
|
normalizePath,
|
|
16
|
-
getPlatformStat
|
|
16
|
+
getPlatformStat,
|
|
17
|
+
getDevUniConsoleCode
|
|
17
18
|
} = require('@dcloudio/uni-cli-shared')
|
|
18
19
|
|
|
19
20
|
const appVuePath = path.resolve(process.env.UNI_INPUT_DIR, 'App.vue')
|
|
@@ -49,6 +50,7 @@ module.exports = function (content, map) {
|
|
|
49
50
|
const loaderContext = this
|
|
50
51
|
|
|
51
52
|
const statCode = getPlatformStat()
|
|
53
|
+
const uniConsoleCode = getDevUniConsoleCode()
|
|
52
54
|
|
|
53
55
|
if (this.resourceQuery) {
|
|
54
56
|
const params = loaderUtils.parseQuery(this.resourceQuery)
|
|
@@ -56,7 +58,7 @@ module.exports = function (content, map) {
|
|
|
56
58
|
if (params.page) {
|
|
57
59
|
params.page = decodeURIComponent(params.page)
|
|
58
60
|
// import Vue from 'vue'是为了触发 vendor 合并
|
|
59
|
-
return
|
|
61
|
+
return `${uniConsoleCode}
|
|
60
62
|
${statCode}
|
|
61
63
|
import 'uni-app-style'
|
|
62
64
|
import 'uni-polyfill'
|
|
@@ -74,5 +76,5 @@ module.exports = function (content, map) {
|
|
|
74
76
|
}
|
|
75
77
|
const automatorCode = process.env.UNI_AUTOMATOR_WS_ENDPOINT ? 'import \'@dcloudio/uni-app-plus/dist/automator\';'
|
|
76
78
|
: ''
|
|
77
|
-
return automatorCode + statCode + content
|
|
78
|
-
}
|
|
79
|
+
return uniConsoleCode + automatorCode + statCode + content
|
|
80
|
+
}
|