weapp-vite 6.4.6 → 6.4.7
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/auto-routes.mjs
CHANGED
|
@@ -30842,6 +30842,7 @@ import path58 from "pathe";
|
|
|
30842
30842
|
// src/plugins/vue/transform/styleRequest.ts
|
|
30843
30843
|
init_esm_shims();
|
|
30844
30844
|
var WEAPP_VUE_STYLE_VIRTUAL_PREFIX = "\0weapp-vite:vue-style:";
|
|
30845
|
+
var WEAPP_VUE_STYLE_VIRTUAL_PREFIX_PLAIN = "weapp-vite:vue-style:";
|
|
30845
30846
|
function parseWeappVueStyleRequest(id) {
|
|
30846
30847
|
const queryIndex = id.indexOf("?");
|
|
30847
30848
|
if (queryIndex === -1) {
|
|
@@ -30861,8 +30862,9 @@ function parseWeappVueStyleRequest(id) {
|
|
|
30861
30862
|
return;
|
|
30862
30863
|
}
|
|
30863
30864
|
let filename = id.slice(0, queryIndex);
|
|
30864
|
-
if (filename.startsWith(WEAPP_VUE_STYLE_VIRTUAL_PREFIX)) {
|
|
30865
|
-
const
|
|
30865
|
+
if (filename.startsWith(WEAPP_VUE_STYLE_VIRTUAL_PREFIX) || filename.startsWith(WEAPP_VUE_STYLE_VIRTUAL_PREFIX_PLAIN)) {
|
|
30866
|
+
const prefix = filename.startsWith(WEAPP_VUE_STYLE_VIRTUAL_PREFIX) ? WEAPP_VUE_STYLE_VIRTUAL_PREFIX : WEAPP_VUE_STYLE_VIRTUAL_PREFIX_PLAIN;
|
|
30867
|
+
const encoded = filename.slice(prefix.length);
|
|
30866
30868
|
if (!encoded) {
|
|
30867
30869
|
return;
|
|
30868
30870
|
}
|
|
@@ -30895,6 +30897,7 @@ function buildWeappVueStyleRequest(filename, styleBlock, index) {
|
|
|
30895
30897
|
|
|
30896
30898
|
// src/plugins/vue/resolver.ts
|
|
30897
30899
|
var VUE_VIRTUAL_MODULE_PREFIX2 = "\0vue:";
|
|
30900
|
+
var LEGACY_WEAPP_VUE_STYLE_VIRTUAL_PREFIX = "weapp-vite:vue-style:";
|
|
30898
30901
|
var warnedMissingWevu = false;
|
|
30899
30902
|
var wevuInstallState = "unknown";
|
|
30900
30903
|
function hasWevuDependency(ctx) {
|
|
@@ -30931,6 +30934,9 @@ function ensureWevuInstalled(ctx) {
|
|
|
30931
30934
|
}
|
|
30932
30935
|
}
|
|
30933
30936
|
function createVueResolverPlugin(ctx) {
|
|
30937
|
+
const isWeappVueStyleVirtualId = (id) => {
|
|
30938
|
+
return id.startsWith(WEAPP_VUE_STYLE_VIRTUAL_PREFIX) || id.startsWith(LEGACY_WEAPP_VUE_STYLE_VIRTUAL_PREFIX);
|
|
30939
|
+
};
|
|
30934
30940
|
return {
|
|
30935
30941
|
name: `${VUE_PLUGIN_NAME}:resolver`,
|
|
30936
30942
|
async resolveId(id, importer) {
|
|
@@ -30941,15 +30947,12 @@ function createVueResolverPlugin(ctx) {
|
|
|
30941
30947
|
const styleRequest = parseWeappVueStyleRequest(id);
|
|
30942
30948
|
if (styleRequest) {
|
|
30943
30949
|
ensureWevuInstalled(ctx);
|
|
30944
|
-
|
|
30945
|
-
|
|
30946
|
-
}
|
|
30950
|
+
const queryIndex = id.indexOf("?");
|
|
30951
|
+
const query = queryIndex === -1 ? "" : id.slice(queryIndex + 1);
|
|
30947
30952
|
const absoluteId2 = toAbsoluteId(styleRequest.filename, configService, importer, { base: "srcRoot" });
|
|
30948
30953
|
if (!absoluteId2) {
|
|
30949
|
-
return null;
|
|
30954
|
+
return isWeappVueStyleVirtualId(id) ? id : null;
|
|
30950
30955
|
}
|
|
30951
|
-
const queryIndex = id.indexOf("?");
|
|
30952
|
-
const query = queryIndex === -1 ? "" : id.slice(queryIndex + 1);
|
|
30953
30956
|
return query ? `${absoluteId2}?${query}` : absoluteId2;
|
|
30954
30957
|
}
|
|
30955
30958
|
if (id.endsWith(".vue")) {
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCompilerContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SW2LBCTY.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_MP_PLATFORM,
|
|
6
6
|
SHARED_CHUNK_VIRTUAL_PREFIX,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
normalizeMiniPlatform,
|
|
14
14
|
resolveMiniPlatform,
|
|
15
15
|
resolveWeappConfigFile
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HQXAJCUN.mjs";
|
|
17
17
|
import {
|
|
18
18
|
VERSION
|
|
19
19
|
} from "./chunk-D2X6N3H6.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./chunk-X5OHU7L4.mjs";
|
|
2
2
|
import {
|
|
3
3
|
createCompilerContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SW2LBCTY.mjs";
|
|
5
5
|
import {
|
|
6
6
|
defineEmits,
|
|
7
7
|
defineProps
|
|
8
8
|
} from "./chunk-4EVKCID7.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-HQXAJCUN.mjs";
|
|
10
10
|
import "./chunk-D2X6N3H6.mjs";
|
|
11
11
|
import {
|
|
12
12
|
defineConfig
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.4.
|
|
4
|
+
"version": "6.4.7",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -108,10 +108,10 @@
|
|
|
108
108
|
"@weapp-core/schematics": "6.0.1",
|
|
109
109
|
"@weapp-vite/volar": "2.0.3",
|
|
110
110
|
"@weapp-vite/web": "1.2.0",
|
|
111
|
+
"rolldown-require": "2.0.2",
|
|
111
112
|
"vite-plugin-performance": "2.0.0",
|
|
112
113
|
"weapp-ide-cli": "5.0.0",
|
|
113
|
-
"wevu": "2.1.3"
|
|
114
|
-
"rolldown-require": "2.0.2"
|
|
114
|
+
"wevu": "2.1.3"
|
|
115
115
|
},
|
|
116
116
|
"publishConfig": {
|
|
117
117
|
"access": "public",
|