weapp-vite 6.2.0 → 6.2.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/auto-import-components/resolvers.mjs +1 -0
- package/dist/auto-routes.mjs +3 -3
- package/dist/{chunk-PMMR7HIQ.mjs → chunk-MEQD2OQV.mjs} +1 -1
- package/dist/{chunk-FC2MZYU3.mjs → chunk-NZGKD6UN.mjs} +1 -1
- package/dist/{chunk-SGNL4SVW.mjs → chunk-R6PSILQG.mjs} +1193 -812
- package/dist/{chunk-2GIOG6RC.mjs → chunk-WH5NEVYM.mjs} +19 -12
- package/dist/cli.mjs +4 -4
- package/dist/{file-JVATZEJQ.mjs → file-XQ5KCZRI.mjs} +1 -1
- package/dist/index.mjs +4 -4
- package/dist/{jsonMacros-VSJW5D23.mjs → jsonMacros-QLL2W47I.mjs} +2 -2
- package/package.json +8 -6
- package/volar.cjs +3 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
jsExtensions,
|
|
4
4
|
require_src,
|
|
5
5
|
vueExtensions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NZGKD6UN.mjs";
|
|
7
7
|
import {
|
|
8
8
|
__commonJS,
|
|
9
9
|
__toESM,
|
|
@@ -561,19 +561,26 @@ function declaredNamesInStatement(statement) {
|
|
|
561
561
|
}
|
|
562
562
|
function collectTopLevelReferencedNames(path12) {
|
|
563
563
|
const names = /* @__PURE__ */ new Set();
|
|
564
|
+
if (!path12) {
|
|
565
|
+
return names;
|
|
566
|
+
}
|
|
567
|
+
const addIfTopLevelReferenced = (p) => {
|
|
568
|
+
if (!p?.isReferencedIdentifier?.()) {
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
const name = p.node.name;
|
|
572
|
+
const binding = p.scope?.getBinding(name);
|
|
573
|
+
if (!binding) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
if (binding.scope?.block?.type === "Program") {
|
|
577
|
+
names.add(name);
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
addIfTopLevelReferenced(path12);
|
|
564
581
|
path12.traverse({
|
|
565
582
|
Identifier(p) {
|
|
566
|
-
|
|
567
|
-
return;
|
|
568
|
-
}
|
|
569
|
-
const name = p.node.name;
|
|
570
|
-
const binding = p.scope.getBinding(name);
|
|
571
|
-
if (!binding) {
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
if (binding.scope?.block?.type === "Program") {
|
|
575
|
-
names.add(name);
|
|
576
|
-
}
|
|
583
|
+
addIfTopLevelReferenced(p);
|
|
577
584
|
}
|
|
578
585
|
});
|
|
579
586
|
return names;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCompilerContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MEQD2OQV.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_MP_PLATFORM,
|
|
6
6
|
SHARED_CHUNK_VIRTUAL_PREFIX,
|
|
7
7
|
createSharedBuildConfig,
|
|
8
8
|
normalizeMiniPlatform,
|
|
9
9
|
resolveMiniPlatform
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R6PSILQG.mjs";
|
|
11
11
|
import {
|
|
12
12
|
checkRuntime,
|
|
13
13
|
createCjsConfigLoadError,
|
|
14
14
|
isPathInside,
|
|
15
15
|
logger_default,
|
|
16
16
|
resolveWeappConfigFile
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WH5NEVYM.mjs";
|
|
18
18
|
import {
|
|
19
19
|
VERSION
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NZGKD6UN.mjs";
|
|
21
21
|
import {
|
|
22
22
|
init_esm_shims
|
|
23
23
|
} from "./chunk-AOUAT7U3.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import "./chunk-3WGUNRY5.mjs";
|
|
2
2
|
import {
|
|
3
3
|
createCompilerContext
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MEQD2OQV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
defineEmits,
|
|
7
7
|
defineProps
|
|
8
8
|
} from "./chunk-7GJOCTON.mjs";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-R6PSILQG.mjs";
|
|
10
|
+
import "./chunk-WH5NEVYM.mjs";
|
|
11
|
+
import "./chunk-NZGKD6UN.mjs";
|
|
12
12
|
import {
|
|
13
13
|
defineConfig
|
|
14
14
|
} from "./chunk-AZBN7A5I.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractJsonMacroFromScriptSetup,
|
|
3
3
|
stripJsonMacroCallsFromCode
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-WH5NEVYM.mjs";
|
|
5
|
+
import "./chunk-NZGKD6UN.mjs";
|
|
6
6
|
import "./chunk-AOUAT7U3.mjs";
|
|
7
7
|
export {
|
|
8
8
|
extractJsonMacroFromScriptSetup,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.2.
|
|
4
|
+
"version": "6.2.2",
|
|
5
5
|
"description": "weapp-vite 一个现代化的小程序打包工具",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"./volar": {
|
|
41
41
|
"types": "./dist/volar.d.ts",
|
|
42
|
-
"import": "./dist/volar.mjs"
|
|
42
|
+
"import": "./dist/volar.mjs",
|
|
43
|
+
"require": "./volar.cjs"
|
|
43
44
|
},
|
|
44
45
|
"./runtime": {
|
|
45
46
|
"types": "./dist/runtime.d.ts",
|
|
@@ -74,7 +75,8 @@
|
|
|
74
75
|
"bin",
|
|
75
76
|
"client.d.ts",
|
|
76
77
|
"dist",
|
|
77
|
-
"modules"
|
|
78
|
+
"modules",
|
|
79
|
+
"volar.cjs"
|
|
78
80
|
],
|
|
79
81
|
"engines": {
|
|
80
82
|
"node": "^20.19.0 || >=22.12.0"
|
|
@@ -100,16 +102,16 @@
|
|
|
100
102
|
"vite": "8.0.0-beta.8",
|
|
101
103
|
"vite-tsconfig-paths": "^6.0.4",
|
|
102
104
|
"vue": "^3.5.26",
|
|
105
|
+
"@weapp-core/init": "6.0.0",
|
|
103
106
|
"@weapp-core/logger": "3.0.0",
|
|
104
107
|
"@weapp-core/schematics": "6.0.0",
|
|
105
108
|
"@weapp-core/shared": "3.0.0",
|
|
106
|
-
"@weapp-vite/volar": "2.0.
|
|
109
|
+
"@weapp-vite/volar": "2.0.2",
|
|
107
110
|
"@weapp-vite/web": "1.0.0",
|
|
108
111
|
"rolldown-require": "2.0.0",
|
|
109
112
|
"vite-plugin-performance": "2.0.0",
|
|
110
113
|
"weapp-ide-cli": "5.0.0",
|
|
111
|
-
"wevu": "1.1.
|
|
112
|
-
"@weapp-core/init": "6.0.0"
|
|
114
|
+
"wevu": "1.1.2"
|
|
113
115
|
},
|
|
114
116
|
"publishConfig": {
|
|
115
117
|
"access": "public",
|
package/volar.cjs
ADDED