weapp-vite 5.12.0 → 6.0.0-alpha.1

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.
Files changed (51) hide show
  1. package/README.md +60 -2
  2. package/dist/auto-import-components/resolvers.cjs +6 -6
  3. package/dist/auto-import-components/resolvers.mjs +1 -1
  4. package/dist/auto-routes.cjs +9 -8
  5. package/dist/auto-routes.mjs +5 -4
  6. package/dist/{chunk-TS7WK45E.mjs → chunk-4P5KX3LT.mjs} +2736 -2346
  7. package/dist/{chunk-MDUMD5GP.mjs → chunk-5CBZRYDL.mjs} +1 -8
  8. package/dist/{chunk-INJNZ3X2.cjs → chunk-E34K6TPD.cjs} +2 -2
  9. package/dist/{chunk-ANDG4OME.cjs → chunk-EL4WI75Z.cjs} +2746 -2356
  10. package/dist/{chunk-7DRE4BEK.cjs → chunk-FB7KR7SH.cjs} +6 -6
  11. package/dist/chunk-IEICAJDZ.cjs +188 -0
  12. package/dist/chunk-MK4LDVBT.mjs +188 -0
  13. package/dist/{chunk-7KGGMLZZ.mjs → chunk-ML5KPLC5.mjs} +1 -1
  14. package/dist/{chunk-IVFT4TLR.mjs → chunk-O6633IWP.mjs} +1 -1
  15. package/dist/{chunk-MTUYQJIF.cjs → chunk-SJSLFDTA.cjs} +2 -2
  16. package/dist/{chunk-N5FVU7GR.cjs → chunk-TZGJRA2Y.cjs} +2 -9
  17. package/dist/chunk-UKTIE44Q.cjs +34 -0
  18. package/dist/{chunk-LLYDSPS7.mjs → chunk-VKLSO3EM.mjs} +2 -2
  19. package/dist/chunk-WYYIFHJZ.cjs +6 -0
  20. package/dist/chunk-YIVKT2UN.mjs +34 -0
  21. package/dist/{chunk-46VA2TEF.mjs → chunk-YXFADQPY.mjs} +1 -1
  22. package/dist/cli.cjs +117 -92
  23. package/dist/cli.mjs +33 -8
  24. package/dist/{config-sFIhUM69.d.ts → config-B6T_L15M.d.ts} +29 -0
  25. package/dist/{config-DgMm7Geo.d.cts → config-D5ATg2Pv.d.cts} +29 -0
  26. package/dist/config.cjs +4 -4
  27. package/dist/config.d.cts +1 -1
  28. package/dist/config.d.ts +1 -1
  29. package/dist/config.mjs +3 -3
  30. package/dist/file-KXULPGWG.mjs +29 -0
  31. package/dist/file-S6QIP4VW.cjs +29 -0
  32. package/dist/index.cjs +18 -9
  33. package/dist/index.d.cts +4 -2
  34. package/dist/index.d.ts +4 -2
  35. package/dist/index.mjs +15 -6
  36. package/dist/json.cjs +3 -3
  37. package/dist/json.d.cts +1 -1
  38. package/dist/json.d.ts +1 -1
  39. package/dist/json.mjs +2 -2
  40. package/dist/runtime.cjs +11 -0
  41. package/dist/runtime.d.cts +29 -0
  42. package/dist/runtime.d.ts +29 -0
  43. package/dist/runtime.mjs +11 -0
  44. package/dist/types.cjs +9 -9
  45. package/dist/types.d.cts +2 -1
  46. package/dist/types.d.ts +2 -1
  47. package/dist/types.mjs +2 -2
  48. package/dist/volar.cjs +2 -2
  49. package/dist/volar.mjs +1 -1
  50. package/package.json +18 -11
  51. package/dist/chunk-2KCQ5UBK.cjs +0 -6
@@ -2,20 +2,20 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkANDG4OMEcjs = require('./chunk-ANDG4OME.cjs');
5
+ var _chunkEL4WI75Zcjs = require('./chunk-EL4WI75Z.cjs');
6
6
 
7
7
 
8
- var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
8
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
9
9
 
10
10
  // src/createContext.ts
11
- _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
11
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
12
12
  async function createCompilerContext(options) {
13
13
  const key = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _ => _.key]), () => ( "default"));
14
14
  if (!_optionalChain([options, 'optionalAccess', _2 => _2.key])) {
15
- _chunkANDG4OMEcjs.resetCompilerContext.call(void 0, key);
15
+ _chunkEL4WI75Zcjs.resetCompilerContext.call(void 0, key);
16
16
  }
17
- _chunkANDG4OMEcjs.setActiveCompilerContextKey.call(void 0, key);
18
- const ctx = _chunkANDG4OMEcjs.getCompilerContext.call(void 0, key);
17
+ _chunkEL4WI75Zcjs.setActiveCompilerContextKey.call(void 0, key);
18
+ const ctx = _chunkEL4WI75Zcjs.getCompilerContext.call(void 0, key);
19
19
  const { configService, scanService, autoRoutesService } = ctx;
20
20
  await configService.load(options);
21
21
  if (autoRoutesService) {
@@ -0,0 +1,188 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
4
+
5
+ // src/utils/file.ts
6
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
7
+ var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
8
+ var _pathe = require('pathe'); var _pathe2 = _interopRequireDefault(_pathe);
9
+ var _compilersfc = require('vue/compiler-sfc');
10
+
11
+ // src/constants.ts
12
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
13
+ var VERSION = "__VERSION__";
14
+ var jsExtensions = ["ts", "js"];
15
+ var vueExtensions = ["vue"];
16
+ var configExtensions = [
17
+ "jsonc",
18
+ "json",
19
+ // 现在这个版本不推荐使用 json.ts 因为这会造成热更新缓慢
20
+ ...jsExtensions.map((x) => `json.${x}`)
21
+ ];
22
+ var supportedCssLangs = ["wxss", "css", "scss", "less", "sass", "styl"];
23
+ var templateExtensions = ["wxml", "html"];
24
+
25
+ // src/utils/file.ts
26
+ function isJsOrTs(name) {
27
+ if (typeof name === "string") {
28
+ return /\.[jt]s$/.test(name);
29
+ }
30
+ return false;
31
+ }
32
+ function isTemplateRequest(request) {
33
+ return request.endsWith(".wxml") || request.endsWith(".html");
34
+ }
35
+ function changeFileExtension(filePath, extension) {
36
+ if (typeof filePath !== "string") {
37
+ throw new TypeError(`Expected \`filePath\` to be a string, got \`${typeof filePath}\`.`);
38
+ }
39
+ if (typeof extension !== "string") {
40
+ throw new TypeError(`Expected \`extension\` to be a string, got \`${typeof extension}\`.`);
41
+ }
42
+ if (filePath === "") {
43
+ return "";
44
+ }
45
+ extension = extension ? extension.startsWith(".") ? extension : `.${extension}` : "";
46
+ const basename = _pathe2.default.basename(filePath, _pathe2.default.extname(filePath));
47
+ return _pathe2.default.join(_pathe2.default.dirname(filePath), basename + extension);
48
+ }
49
+ async function findVueEntry(filepath) {
50
+ for (const ext of vueExtensions) {
51
+ const p = changeFileExtension(filepath, ext);
52
+ if (await _fsextra2.default.exists(p)) {
53
+ return p;
54
+ }
55
+ }
56
+ }
57
+ async function findJsEntry(filepath) {
58
+ const predictions = jsExtensions.map((ext) => {
59
+ return changeFileExtension(filepath, ext);
60
+ });
61
+ for (const p of predictions) {
62
+ if (await _fsextra2.default.exists(p)) {
63
+ return {
64
+ path: p,
65
+ predictions
66
+ };
67
+ }
68
+ }
69
+ return {
70
+ predictions
71
+ };
72
+ }
73
+ async function findJsonEntry(filepath) {
74
+ const predictions = configExtensions.map((ext) => {
75
+ return changeFileExtension(filepath, ext);
76
+ });
77
+ for (const p of predictions) {
78
+ if (await _fsextra2.default.exists(p)) {
79
+ return {
80
+ predictions,
81
+ path: p
82
+ };
83
+ }
84
+ }
85
+ return {
86
+ predictions
87
+ };
88
+ }
89
+ async function findCssEntry(filepath) {
90
+ const predictions = supportedCssLangs.map((ext) => {
91
+ return changeFileExtension(filepath, ext);
92
+ });
93
+ for (const p of predictions) {
94
+ if (await _fsextra2.default.exists(p)) {
95
+ return {
96
+ predictions,
97
+ path: p
98
+ };
99
+ }
100
+ }
101
+ return {
102
+ predictions
103
+ };
104
+ }
105
+ async function findTemplateEntry(filepath) {
106
+ const predictions = templateExtensions.map((ext) => {
107
+ return changeFileExtension(filepath, ext);
108
+ });
109
+ for (const p of predictions) {
110
+ if (await _fsextra2.default.exists(p)) {
111
+ return {
112
+ predictions,
113
+ path: p
114
+ };
115
+ }
116
+ }
117
+ return {
118
+ predictions
119
+ };
120
+ }
121
+ function isTemplate(filepath) {
122
+ return templateExtensions.some((ext) => filepath.endsWith(`.${ext}`));
123
+ }
124
+ function touchSync(filename) {
125
+ const time = /* @__PURE__ */ new Date();
126
+ try {
127
+ _fsextra2.default.utimesSync(filename, time, time);
128
+ } catch (e) {
129
+ _fsextra2.default.closeSync(_fsextra2.default.openSync(filename, "w"));
130
+ }
131
+ }
132
+ async function touch(filename) {
133
+ const time = /* @__PURE__ */ new Date();
134
+ try {
135
+ await _fsextra2.default.utimes(filename, time, time);
136
+ } catch (e2) {
137
+ await _fsextra2.default.close(await _fsextra2.default.open(filename, "w"));
138
+ }
139
+ }
140
+ async function extractConfigFromVue(vueFilePath) {
141
+ try {
142
+ const content = await _fsextra2.default.readFile(vueFilePath, "utf-8");
143
+ const { descriptor, errors } = _compilersfc.parse.call(void 0, content, { filename: vueFilePath });
144
+ if (errors.length > 0) {
145
+ return void 0;
146
+ }
147
+ const configBlocks = descriptor.customBlocks.filter((block) => block.type === "config");
148
+ if (!configBlocks.length) {
149
+ return void 0;
150
+ }
151
+ const mergedConfig = {};
152
+ const { parse: parseJson } = await Promise.resolve().then(() => _interopRequireWildcard(require("comment-json")));
153
+ for (const block of configBlocks) {
154
+ try {
155
+ const lang = block.lang || "json";
156
+ if (lang === "json" || lang === "json5" || lang === "jsonc") {
157
+ const config = parseJson(block.content, void 0, true);
158
+ Object.assign(mergedConfig, config);
159
+ }
160
+ } catch (e3) {
161
+ }
162
+ }
163
+ return Object.keys(mergedConfig).length > 0 ? mergedConfig : void 0;
164
+ } catch (e4) {
165
+ return void 0;
166
+ }
167
+ }
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ exports.VERSION = VERSION; exports.jsExtensions = jsExtensions; exports.vueExtensions = vueExtensions; exports.configExtensions = configExtensions; exports.supportedCssLangs = supportedCssLangs; exports.templateExtensions = templateExtensions; exports.isJsOrTs = isJsOrTs; exports.isTemplateRequest = isTemplateRequest; exports.changeFileExtension = changeFileExtension; exports.findVueEntry = findVueEntry; exports.findJsEntry = findJsEntry; exports.findJsonEntry = findJsonEntry; exports.findCssEntry = findCssEntry; exports.findTemplateEntry = findTemplateEntry; exports.isTemplate = isTemplate; exports.touchSync = touchSync; exports.touch = touch; exports.extractConfigFromVue = extractConfigFromVue;
@@ -0,0 +1,188 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-5CBZRYDL.mjs";
4
+
5
+ // src/utils/file.ts
6
+ init_esm_shims();
7
+ import fs from "fs-extra";
8
+ import path from "pathe";
9
+ import { parse } from "vue/compiler-sfc";
10
+
11
+ // src/constants.ts
12
+ init_esm_shims();
13
+ var VERSION = "__VERSION__";
14
+ var jsExtensions = ["ts", "js"];
15
+ var vueExtensions = ["vue"];
16
+ var configExtensions = [
17
+ "jsonc",
18
+ "json",
19
+ // 现在这个版本不推荐使用 json.ts 因为这会造成热更新缓慢
20
+ ...jsExtensions.map((x) => `json.${x}`)
21
+ ];
22
+ var supportedCssLangs = ["wxss", "css", "scss", "less", "sass", "styl"];
23
+ var templateExtensions = ["wxml", "html"];
24
+
25
+ // src/utils/file.ts
26
+ function isJsOrTs(name) {
27
+ if (typeof name === "string") {
28
+ return /\.[jt]s$/.test(name);
29
+ }
30
+ return false;
31
+ }
32
+ function isTemplateRequest(request) {
33
+ return request.endsWith(".wxml") || request.endsWith(".html");
34
+ }
35
+ function changeFileExtension(filePath, extension) {
36
+ if (typeof filePath !== "string") {
37
+ throw new TypeError(`Expected \`filePath\` to be a string, got \`${typeof filePath}\`.`);
38
+ }
39
+ if (typeof extension !== "string") {
40
+ throw new TypeError(`Expected \`extension\` to be a string, got \`${typeof extension}\`.`);
41
+ }
42
+ if (filePath === "") {
43
+ return "";
44
+ }
45
+ extension = extension ? extension.startsWith(".") ? extension : `.${extension}` : "";
46
+ const basename = path.basename(filePath, path.extname(filePath));
47
+ return path.join(path.dirname(filePath), basename + extension);
48
+ }
49
+ async function findVueEntry(filepath) {
50
+ for (const ext of vueExtensions) {
51
+ const p = changeFileExtension(filepath, ext);
52
+ if (await fs.exists(p)) {
53
+ return p;
54
+ }
55
+ }
56
+ }
57
+ async function findJsEntry(filepath) {
58
+ const predictions = jsExtensions.map((ext) => {
59
+ return changeFileExtension(filepath, ext);
60
+ });
61
+ for (const p of predictions) {
62
+ if (await fs.exists(p)) {
63
+ return {
64
+ path: p,
65
+ predictions
66
+ };
67
+ }
68
+ }
69
+ return {
70
+ predictions
71
+ };
72
+ }
73
+ async function findJsonEntry(filepath) {
74
+ const predictions = configExtensions.map((ext) => {
75
+ return changeFileExtension(filepath, ext);
76
+ });
77
+ for (const p of predictions) {
78
+ if (await fs.exists(p)) {
79
+ return {
80
+ predictions,
81
+ path: p
82
+ };
83
+ }
84
+ }
85
+ return {
86
+ predictions
87
+ };
88
+ }
89
+ async function findCssEntry(filepath) {
90
+ const predictions = supportedCssLangs.map((ext) => {
91
+ return changeFileExtension(filepath, ext);
92
+ });
93
+ for (const p of predictions) {
94
+ if (await fs.exists(p)) {
95
+ return {
96
+ predictions,
97
+ path: p
98
+ };
99
+ }
100
+ }
101
+ return {
102
+ predictions
103
+ };
104
+ }
105
+ async function findTemplateEntry(filepath) {
106
+ const predictions = templateExtensions.map((ext) => {
107
+ return changeFileExtension(filepath, ext);
108
+ });
109
+ for (const p of predictions) {
110
+ if (await fs.exists(p)) {
111
+ return {
112
+ predictions,
113
+ path: p
114
+ };
115
+ }
116
+ }
117
+ return {
118
+ predictions
119
+ };
120
+ }
121
+ function isTemplate(filepath) {
122
+ return templateExtensions.some((ext) => filepath.endsWith(`.${ext}`));
123
+ }
124
+ function touchSync(filename) {
125
+ const time = /* @__PURE__ */ new Date();
126
+ try {
127
+ fs.utimesSync(filename, time, time);
128
+ } catch {
129
+ fs.closeSync(fs.openSync(filename, "w"));
130
+ }
131
+ }
132
+ async function touch(filename) {
133
+ const time = /* @__PURE__ */ new Date();
134
+ try {
135
+ await fs.utimes(filename, time, time);
136
+ } catch {
137
+ await fs.close(await fs.open(filename, "w"));
138
+ }
139
+ }
140
+ async function extractConfigFromVue(vueFilePath) {
141
+ try {
142
+ const content = await fs.readFile(vueFilePath, "utf-8");
143
+ const { descriptor, errors } = parse(content, { filename: vueFilePath });
144
+ if (errors.length > 0) {
145
+ return void 0;
146
+ }
147
+ const configBlocks = descriptor.customBlocks.filter((block) => block.type === "config");
148
+ if (!configBlocks.length) {
149
+ return void 0;
150
+ }
151
+ const mergedConfig = {};
152
+ const { parse: parseJson } = await import("comment-json");
153
+ for (const block of configBlocks) {
154
+ try {
155
+ const lang = block.lang || "json";
156
+ if (lang === "json" || lang === "json5" || lang === "jsonc") {
157
+ const config = parseJson(block.content, void 0, true);
158
+ Object.assign(mergedConfig, config);
159
+ }
160
+ } catch {
161
+ }
162
+ }
163
+ return Object.keys(mergedConfig).length > 0 ? mergedConfig : void 0;
164
+ } catch {
165
+ return void 0;
166
+ }
167
+ }
168
+
169
+ export {
170
+ VERSION,
171
+ jsExtensions,
172
+ vueExtensions,
173
+ configExtensions,
174
+ supportedCssLangs,
175
+ templateExtensions,
176
+ isJsOrTs,
177
+ isTemplateRequest,
178
+ changeFileExtension,
179
+ findVueEntry,
180
+ findJsEntry,
181
+ findJsonEntry,
182
+ findCssEntry,
183
+ findTemplateEntry,
184
+ isTemplate,
185
+ touchSync,
186
+ touch,
187
+ extractConfigFromVue
188
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-MDUMD5GP.mjs";
3
+ } from "./chunk-5CBZRYDL.mjs";
4
4
 
5
5
  // src/types/external.ts
6
6
  init_esm_shims();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-MDUMD5GP.mjs";
3
+ } from "./chunk-5CBZRYDL.mjs";
4
4
 
5
5
  // src/json.ts
6
6
  init_esm_shims();
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkN5FVU7GRcjs = require('./chunk-N5FVU7GR.cjs');
3
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
4
4
 
5
5
  // src/json.ts
6
- _chunkN5FVU7GRcjs.init_cjs_shims.call(void 0, );
6
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
7
7
  var defineAppJson = (config) => {
8
8
  return config;
9
9
  };
@@ -4,16 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __getProtoOf = Object.getPrototypeOf;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
7
  var __esm = (fn, res) => function __init() {
14
8
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
15
9
  };
16
- var __commonJS = (cb, mod) => function __require2() {
10
+ var __commonJS = (cb, mod) => function __require() {
17
11
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
12
  };
19
13
  var __copyProps = (to, from, except, desc) => {
@@ -48,5 +42,4 @@ var init_cjs_shims = __esm({
48
42
 
49
43
 
50
44
 
51
-
52
- exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.importMetaUrl = importMetaUrl; exports.init_cjs_shims = init_cjs_shims;
45
+ exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.importMetaUrl = importMetaUrl; exports.init_cjs_shims = init_cjs_shims;
@@ -0,0 +1,34 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
4
+
5
+ // src/plugins/vue/runtime.ts
6
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
7
+ var _wevu = require('wevu');
8
+ function createWevuComponent(options) {
9
+ const {
10
+ properties,
11
+ ...restOptions
12
+ } = options;
13
+ const mpOptions = {};
14
+ if (properties) {
15
+ mpOptions.properties = properties;
16
+ }
17
+ const finalOptions = {
18
+ ...restOptions,
19
+ ...mpOptions
20
+ };
21
+ _wevu.defineComponent.call(void 0, finalOptions);
22
+ }
23
+ function defineProps(props) {
24
+ return props;
25
+ }
26
+ function defineEmits(emits) {
27
+ return emits;
28
+ }
29
+
30
+
31
+
32
+
33
+
34
+ exports.createWevuComponent = createWevuComponent; exports.defineProps = defineProps; exports.defineEmits = defineEmits;
@@ -2,10 +2,10 @@ import {
2
2
  getCompilerContext,
3
3
  resetCompilerContext,
4
4
  setActiveCompilerContextKey
5
- } from "./chunk-TS7WK45E.mjs";
5
+ } from "./chunk-4P5KX3LT.mjs";
6
6
  import {
7
7
  init_esm_shims
8
- } from "./chunk-MDUMD5GP.mjs";
8
+ } from "./chunk-5CBZRYDL.mjs";
9
9
 
10
10
  // src/createContext.ts
11
11
  init_esm_shims();
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _chunkTZGJRA2Ycjs = require('./chunk-TZGJRA2Y.cjs');
4
+
5
+ // src/types/external.ts
6
+ _chunkTZGJRA2Ycjs.init_cjs_shims.call(void 0, );
@@ -0,0 +1,34 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-5CBZRYDL.mjs";
4
+
5
+ // src/plugins/vue/runtime.ts
6
+ init_esm_shims();
7
+ import { defineComponent } from "wevu";
8
+ function createWevuComponent(options) {
9
+ const {
10
+ properties,
11
+ ...restOptions
12
+ } = options;
13
+ const mpOptions = {};
14
+ if (properties) {
15
+ mpOptions.properties = properties;
16
+ }
17
+ const finalOptions = {
18
+ ...restOptions,
19
+ ...mpOptions
20
+ };
21
+ defineComponent(finalOptions);
22
+ }
23
+ function defineProps(props) {
24
+ return props;
25
+ }
26
+ function defineEmits(emits) {
27
+ return emits;
28
+ }
29
+
30
+ export {
31
+ createWevuComponent,
32
+ defineProps,
33
+ defineEmits
34
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_esm_shims
3
- } from "./chunk-MDUMD5GP.mjs";
3
+ } from "./chunk-5CBZRYDL.mjs";
4
4
 
5
5
  // src/config.ts
6
6
  init_esm_shims();