@dcloudio/vue-cli-plugin-hbuilderx 2.0.0-32620210831002 → 2.0.0-32920211029001
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.
|
@@ -11,7 +11,7 @@ const {
|
|
|
11
11
|
nvueHtmlPreprocessOptions,
|
|
12
12
|
getTemplatePath
|
|
13
13
|
} = require('@dcloudio/uni-cli-shared')
|
|
14
|
-
|
|
14
|
+
const fileLoader = require('@dcloudio/uni-cli-shared/lib/file-loader')
|
|
15
15
|
const WebpackAppPlusNVuePlugin = process.env.UNI_USING_V3
|
|
16
16
|
? require('../packages/webpack-app-plus-plugin')
|
|
17
17
|
: require('../packages/webpack-app-plus-nvue-plugin')
|
|
@@ -109,13 +109,7 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
109
109
|
|
|
110
110
|
const rules = [{
|
|
111
111
|
test: /\.(png|jpg|gif|ttf|eot|woff|woff2)$/i,
|
|
112
|
-
use: [
|
|
113
|
-
loader: 'file-loader',
|
|
114
|
-
options: {
|
|
115
|
-
publicPath: 'assets',
|
|
116
|
-
outputPath: 'assets'
|
|
117
|
-
}
|
|
118
|
-
}]
|
|
112
|
+
use: [fileLoader]
|
|
119
113
|
}, {
|
|
120
114
|
test: path.resolve(process.env.UNI_INPUT_DIR, 'pages.json'),
|
|
121
115
|
use: [{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcloudio/vue-cli-plugin-hbuilderx",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-32920211029001",
|
|
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": "9577a22e00e4b90c8830d34f5966f1d379b455ea"
|
|
22
22
|
}
|
|
@@ -8,6 +8,7 @@ module.exports = function (content, map) {
|
|
|
8
8
|
this.callback(null, 'module.exports = ' + genStyleString(content, this), map)
|
|
9
9
|
}
|
|
10
10
|
const uniI18n = require('@dcloudio/uni-cli-i18n')
|
|
11
|
+
const print = require('../../../util/console')
|
|
11
12
|
|
|
12
13
|
// @todo:
|
|
13
14
|
// font-relative lengths: em, ex, ch, ic
|
|
@@ -56,7 +57,19 @@ function genStyleString (input, loader) {
|
|
|
56
57
|
msgs.unshift(uniI18n.__('pluginHbuilderx.nvueCssWarning'))
|
|
57
58
|
isFirst = false
|
|
58
59
|
}
|
|
59
|
-
msgs.forEach(msg =>
|
|
60
|
+
msgs.forEach(msg => {
|
|
61
|
+
switch (msg.split(':')[0]) {
|
|
62
|
+
case 'ERROR':
|
|
63
|
+
print.error(msg)
|
|
64
|
+
break
|
|
65
|
+
case 'WARNING' :
|
|
66
|
+
print.warn(msg)
|
|
67
|
+
break
|
|
68
|
+
default:
|
|
69
|
+
print.log(msg)
|
|
70
|
+
break
|
|
71
|
+
}
|
|
72
|
+
})
|
|
60
73
|
}
|
|
61
74
|
}
|
|
62
75
|
try {
|
package/util/console.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const ZERO_WIDTH_CHAR = {
|
|
2
|
+
NOTE: '',
|
|
3
|
+
WARNING: '\u200B',
|
|
4
|
+
ERROR: '\u200C',
|
|
5
|
+
backup0: '\u200D',
|
|
6
|
+
backup1: '\u200E',
|
|
7
|
+
backup2: '\u200F',
|
|
8
|
+
backup3: '\uFEFF'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
warn (msg) {
|
|
13
|
+
msg = ZERO_WIDTH_CHAR.WARNING + msg + ZERO_WIDTH_CHAR.WARNING
|
|
14
|
+
console.warn(msg)
|
|
15
|
+
},
|
|
16
|
+
error (msg) {
|
|
17
|
+
msg = ZERO_WIDTH_CHAR.ERROR + msg + ZERO_WIDTH_CHAR.ERROR
|
|
18
|
+
console.error(msg)
|
|
19
|
+
},
|
|
20
|
+
log (msg) {
|
|
21
|
+
console.log(msg)
|
|
22
|
+
}
|
|
23
|
+
}
|