@meituan-nocode/vite-plugin-nocode-compiler 0.2.9-beta.1 → 0.2.9-beta.2
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.cjs +3 -6
- package/dist/index.js +3 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,7 @@ function readJsonBody(req) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
// package.json
|
|
50
|
-
var version = "0.2.9-beta.
|
|
50
|
+
var version = "0.2.9-beta.2";
|
|
51
51
|
|
|
52
52
|
// src/index.ts
|
|
53
53
|
function getHotChannel(server) {
|
|
@@ -135,12 +135,9 @@ function ensurePluginFirst(config, onError) {
|
|
|
135
135
|
try {
|
|
136
136
|
const plugins = config.plugins;
|
|
137
137
|
if (!Array.isArray(plugins)) return;
|
|
138
|
-
const
|
|
139
|
-
if (!targetPlugin) return;
|
|
140
|
-
if (plugins[0] === targetPlugin) return;
|
|
141
|
-
const idx = plugins.indexOf(targetPlugin);
|
|
138
|
+
const idx = plugins.findIndex((p) => p.name === PLUGIN_NAME);
|
|
142
139
|
if (idx > 0) {
|
|
143
|
-
plugins.splice(idx, 1);
|
|
140
|
+
const [targetPlugin] = plugins.splice(idx, 1);
|
|
144
141
|
plugins.unshift(targetPlugin);
|
|
145
142
|
}
|
|
146
143
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ function readJsonBody(req) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// package.json
|
|
25
|
-
var version = "0.2.9-beta.
|
|
25
|
+
var version = "0.2.9-beta.2";
|
|
26
26
|
|
|
27
27
|
// src/index.ts
|
|
28
28
|
function getHotChannel(server) {
|
|
@@ -110,12 +110,9 @@ function ensurePluginFirst(config, onError) {
|
|
|
110
110
|
try {
|
|
111
111
|
const plugins = config.plugins;
|
|
112
112
|
if (!Array.isArray(plugins)) return;
|
|
113
|
-
const
|
|
114
|
-
if (!targetPlugin) return;
|
|
115
|
-
if (plugins[0] === targetPlugin) return;
|
|
116
|
-
const idx = plugins.indexOf(targetPlugin);
|
|
113
|
+
const idx = plugins.findIndex((p) => p.name === PLUGIN_NAME);
|
|
117
114
|
if (idx > 0) {
|
|
118
|
-
plugins.splice(idx, 1);
|
|
115
|
+
const [targetPlugin] = plugins.splice(idx, 1);
|
|
119
116
|
plugins.unshift(targetPlugin);
|
|
120
117
|
}
|
|
121
118
|
} catch (e) {
|