@arkxio/ark-dev-utils 0.1.10 → 0.1.11
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/dist/index.js +4 -4
- package/dist/index.min.js +4 -4
- package/lib/index.js +4 -4
- package/package.json +1 -1
- package/src/ArkWebpackPlugin.js +4 -4
package/dist/index.js
CHANGED
|
@@ -1249,18 +1249,18 @@
|
|
|
1249
1249
|
let findUnpkgModel = false;
|
|
1250
1250
|
const webpackRequireLPatternEval = /"https:\/\/unpkg\.com"/g;
|
|
1251
1251
|
if (webpackRequireLPatternEval.test(content)) {
|
|
1252
|
+
webpackRequireLPatternEval.lastIndex = 0;
|
|
1253
|
+
verbose('检测到 转码 unpkg.com 模式');
|
|
1252
1254
|
content = content.replace(webpackRequireLPatternEval, 'window.ArkConfig.cdnHost');
|
|
1253
1255
|
findUnpkgModel = true;
|
|
1254
1256
|
}
|
|
1255
1257
|
|
|
1256
1258
|
const webpackRequireLPattern = /"(https:\/\/unpkg\.com)/g;
|
|
1257
1259
|
if (webpackRequireLPattern.test(content)) {
|
|
1260
|
+
webpackRequireLPattern.lastIndex = 0;
|
|
1258
1261
|
findUnpkgModel = true;
|
|
1259
1262
|
verbose('检测到 unpkg.com 模式');
|
|
1260
|
-
content = content.replace(
|
|
1261
|
-
webpackRequireLPattern,
|
|
1262
|
-
`window.ArkConfig.cdnHost + "`
|
|
1263
|
-
);
|
|
1263
|
+
content = content.replace(webpackRequireLPattern,`window.ArkConfig.cdnHost + "`);
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
1266
|
if (findUnpkgModel) {
|
package/dist/index.min.js
CHANGED
|
@@ -1249,18 +1249,18 @@
|
|
|
1249
1249
|
let findUnpkgModel = false;
|
|
1250
1250
|
const webpackRequireLPatternEval = /"https:\/\/unpkg\.com"/g;
|
|
1251
1251
|
if (webpackRequireLPatternEval.test(content)) {
|
|
1252
|
+
webpackRequireLPatternEval.lastIndex = 0;
|
|
1253
|
+
verbose('检测到 转码 unpkg.com 模式');
|
|
1252
1254
|
content = content.replace(webpackRequireLPatternEval, 'window.ArkConfig.cdnHost');
|
|
1253
1255
|
findUnpkgModel = true;
|
|
1254
1256
|
}
|
|
1255
1257
|
|
|
1256
1258
|
const webpackRequireLPattern = /"(https:\/\/unpkg\.com)/g;
|
|
1257
1259
|
if (webpackRequireLPattern.test(content)) {
|
|
1260
|
+
webpackRequireLPattern.lastIndex = 0;
|
|
1258
1261
|
findUnpkgModel = true;
|
|
1259
1262
|
verbose('检测到 unpkg.com 模式');
|
|
1260
|
-
content = content.replace(
|
|
1261
|
-
webpackRequireLPattern,
|
|
1262
|
-
`window.ArkConfig.cdnHost + "`
|
|
1263
|
-
);
|
|
1263
|
+
content = content.replace(webpackRequireLPattern,`window.ArkConfig.cdnHost + "`);
|
|
1264
1264
|
}
|
|
1265
1265
|
|
|
1266
1266
|
if (findUnpkgModel) {
|
package/lib/index.js
CHANGED
|
@@ -1254,18 +1254,18 @@ class ArkWebpackPlugin {
|
|
|
1254
1254
|
let findUnpkgModel = false;
|
|
1255
1255
|
const webpackRequireLPatternEval = /"https:\/\/unpkg\.com"/g;
|
|
1256
1256
|
if (webpackRequireLPatternEval.test(content)) {
|
|
1257
|
+
webpackRequireLPatternEval.lastIndex = 0;
|
|
1258
|
+
verbose('检测到 转码 unpkg.com 模式');
|
|
1257
1259
|
content = content.replace(webpackRequireLPatternEval, 'window.ArkConfig.cdnHost');
|
|
1258
1260
|
findUnpkgModel = true;
|
|
1259
1261
|
}
|
|
1260
1262
|
|
|
1261
1263
|
const webpackRequireLPattern = /"(https:\/\/unpkg\.com)/g;
|
|
1262
1264
|
if (webpackRequireLPattern.test(content)) {
|
|
1265
|
+
webpackRequireLPattern.lastIndex = 0;
|
|
1263
1266
|
findUnpkgModel = true;
|
|
1264
1267
|
verbose('检测到 unpkg.com 模式');
|
|
1265
|
-
content = content.replace(
|
|
1266
|
-
webpackRequireLPattern,
|
|
1267
|
-
`window.ArkConfig.cdnHost + "`
|
|
1268
|
-
);
|
|
1268
|
+
content = content.replace(webpackRequireLPattern,`window.ArkConfig.cdnHost + "`);
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
if (findUnpkgModel) {
|
package/package.json
CHANGED
package/src/ArkWebpackPlugin.js
CHANGED
|
@@ -74,18 +74,18 @@ export default class ArkWebpackPlugin {
|
|
|
74
74
|
let findUnpkgModel = false;
|
|
75
75
|
const webpackRequireLPatternEval = /"https:\/\/unpkg\.com"/g;
|
|
76
76
|
if (webpackRequireLPatternEval.test(content)) {
|
|
77
|
+
webpackRequireLPatternEval.lastIndex = 0;
|
|
78
|
+
verbose('检测到 转码 unpkg.com 模式');
|
|
77
79
|
content = content.replace(webpackRequireLPatternEval, 'window.ArkConfig.cdnHost');
|
|
78
80
|
findUnpkgModel = true;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
83
|
const webpackRequireLPattern = /"(https:\/\/unpkg\.com)/g;
|
|
82
84
|
if (webpackRequireLPattern.test(content)) {
|
|
85
|
+
webpackRequireLPattern.lastIndex = 0;
|
|
83
86
|
findUnpkgModel = true;
|
|
84
87
|
verbose('检测到 unpkg.com 模式');
|
|
85
|
-
content = content.replace(
|
|
86
|
-
webpackRequireLPattern,
|
|
87
|
-
`window.ArkConfig.cdnHost + "`
|
|
88
|
-
);
|
|
88
|
+
content = content.replace(webpackRequireLPattern,`window.ArkConfig.cdnHost + "`);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
if (findUnpkgModel) {
|