@@ -16,18 +16,16 @@ var export_helper_default = (sfc, props) => {
16
16
// tests/fixtures/basic.vue
17
17
console.log("Hello world");
18
18
var _sfc_main = { } ;
19
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
20
- "h1",
21
- null,
22
- "Hello World",
23
- -1
24
- /* HOISTED */
25
- );
26
- var _hoisted_2 = [
27
- _hoisted_1
28
- ];
29
19
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
30
- return _openBlock (), _createElementBlock (" div" , null , [... _hoisted_2 ]);
20
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
21
+ _createElementVNode (
22
+ " h1" ,
23
+ null ,
24
+ " Hello World" ,
25
+ - 1
26
+ /* HOISTED */
27
+ )
28
+ ]));
31
29
}
32
30
var basic_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "#FILE#"]]);
33
31
export {
@@ -54,18 +52,16 @@ var export_helper_default = (sfc, props) => {
54
52
// tests/fixtures/basic.vue
55
53
console.log("Hello world");
56
54
var _sfc_main = { } ;
57
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
58
- "h1",
59
- null,
60
- "Hello World",
61
- -1
62
- /* HOISTED */
63
- );
64
- var _hoisted_2 = [
65
- _hoisted_1
66
- ];
67
55
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
68
- return _openBlock (), _createElementBlock (" div" , null , _hoisted_2 );
56
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
57
+ _createElementVNode (
58
+ " h1" ,
59
+ null ,
60
+ " Hello World" ,
61
+ - 1
62
+ /* HOISTED */
63
+ )
64
+ ]));
69
65
}
70
66
var basic_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render]]);
71
67
export {
@@ -191,18 +187,16 @@ var _sfc_main = {
191
187
return __returned__ ;
192
188
}
193
189
};
194
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
195
- "h1",
196
- null,
197
- "Hello World",
198
- -1
199
- /* HOISTED */
200
- );
201
- var _hoisted_2 = [
202
- _hoisted_1
203
- ];
204
190
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
205
- return _openBlock (), _createElementBlock (" div" , null , [... _hoisted_2 ]);
191
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
192
+ _createElementVNode (
193
+ " h1" ,
194
+ null ,
195
+ " Hello World" ,
196
+ - 1
197
+ /* HOISTED */
198
+ )
199
+ ]));
206
200
}
207
201
var script_setup_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "#FILE#"]]);
208
202
export {
@@ -216,21 +210,19 @@ exports[`esbuild > tests/fixtures/script-setup.vue > isProduction = false 2`] =
216
210
exports [` esbuild > tests/fixtures/script-setup.vue > isProduction = true 1` ] = `
217
211
"// tests/fixtures/script-setup.vue
218
212
import { createElementVNode as _createElementVNode , openBlock as _openBlock , createElementBlock as _createElementBlock } from "vue";
219
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
220
- "h1",
221
- null,
222
- "Hello World",
223
- -1
224
- /* HOISTED */
225
- );
226
- var _hoisted_2 = [
227
- _hoisted_1
228
- ];
229
213
var _sfc_main = {
230
214
__name : " script-setup" ,
231
215
setup (__props ) {
232
216
return (_ctx , _cache ) => {
233
- return _openBlock (), _createElementBlock (" div" , null , _hoisted_2 );
217
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
218
+ _createElementVNode (
219
+ " h1" ,
220
+ null ,
221
+ " Hello World" ,
222
+ - 1
223
+ /* HOISTED */
224
+ )
225
+ ]));
234
226
};
235
227
}
236
228
} ;
@@ -262,16 +254,11 @@ var str = "bar";
262
254
var _sfc_main = /* @__PURE__ */ _defineComponent({
263
255
__name : " script-setup-ts" ,
264
256
props : {
265
- foo: { type: String , required: true },
266
- bar: { type: Number , required: true },
267
- baz: { type: Boolean , required: true }
257
+ foo: { type: String , required: true , default: " 123 " },
258
+ bar: { type: Number , required: true , default: 123 },
259
+ baz: { type: Boolean , required: true , default: true }
268
260
},
269
261
setup (__props , { expose: __expose }) {
270
- const {
271
- foo = "123",
272
- bar = 123,
273
- baz = true
274
- } = __props ;
275
262
__expose({
276
263
str
277
264
});
@@ -280,18 +267,16 @@ var _sfc_main = /* @__PURE__ */ _defineComponent({
280
267
return __returned__ ;
281
268
}
282
269
});
283
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
284
- "h1",
285
- null,
286
- "Hello World",
287
- -1
288
- /* HOISTED */
289
- );
290
- var _hoisted_2 = [
291
- _hoisted_1
292
- ];
293
270
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
294
- return _openBlock (), _createElementBlock (" div" , null , [... _hoisted_2 ]);
271
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
272
+ _createElementVNode (
273
+ " h1" ,
274
+ null ,
275
+ " Hello World" ,
276
+ - 1
277
+ /* HOISTED */
278
+ )
279
+ ]));
295
280
}
296
281
var script_setup_ts_default = /* @__PURE__ */ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "#FILE#"]]);
297
282
export {
@@ -306,35 +291,28 @@ exports[`esbuild > tests/fixtures/script-setup-ts.vue > isProduction = true 1`]
306
291
"// tests/fixtures/script-setup-ts.vue
307
292
import { defineComponent as _defineComponent } from "vue";
308
293
import { createElementVNode as _createElementVNode , openBlock as _openBlock , createElementBlock as _createElementBlock } from "vue";
309
- var _hoisted_1 = /* @__PURE__ */ _createElementVNode(
310
- "h1",
311
- null,
312
- "Hello World",
313
- -1
314
- /* HOISTED */
315
- );
316
- var _hoisted_2 = [
317
- _hoisted_1
318
- ];
319
294
var str = "bar";
320
295
var _sfc_main = /* @__PURE__ */ _defineComponent({
321
296
__name : " script-setup-ts" ,
322
297
props : {
323
- foo: {},
324
- bar: {},
325
- baz: { type: Boolean }
298
+ foo: { default: " 123 " },
299
+ bar: { default: 123 },
300
+ baz: { type: Boolean , default: true }
326
301
},
327
302
setup (__props , { expose: __expose }) {
328
- const {
329
- foo = "123",
330
- bar = 123,
331
- baz = true
332
- } = __props ;
333
303
__expose({
334
304
str
335
305
});
336
306
return (_ctx , _cache ) => {
337
- return _openBlock (), _createElementBlock (" div" , null , _hoisted_2 );
307
+ return _openBlock (), _createElementBlock (" div" , null , _cache [0 ] || (_cache [0 ] = [
308
+ _createElementVNode (
309
+ " h1" ,
310
+ null ,
311
+ " Hello World" ,
312
+ - 1
313
+ /* HOISTED */
314
+ )
315
+ ]));
338
316
};
339
317
}
340
318
} );
0 commit comments