@@ -100,7 +100,8 @@ var _export_sfc = (sfc, props) => {
100
100
101
101
const _sfc_main = {
102
102
__name : ' reactivity-transform' ,
103
- setup (__props ) {
103
+ setup (__props , { expose: __expose }) {
104
+ __expose();
104
105
105
106
const ref1 = $ref('hello ');
106
107
const ref2 = $(ref ('hello '));
@@ -110,7 +111,9 @@ console.log(ref2);
110
111
console.log($$ (ref1 ));
111
112
console.log($$ (ref2 ));
112
113
113
- return () => {}
114
+ const __returned__ = { ref1 , ref2 , ref };
115
+ Object .defineProperty (__returned__ , ' __isScriptSetup' , { enumerable: false , value: true });
116
+ return __returned__
114
117
}
115
118
116
119
};
@@ -157,23 +160,30 @@ var _export_sfc = (sfc, props) => {
157
160
return target ;
158
161
} ;
159
162
160
- const _hoisted_1 = /*#__PURE__*/createElementVNode("h1", null, "Hello World", -1 /* HOISTED */);
161
- const _hoisted_2 = [
162
- _hoisted_1
163
- ];
163
+ const foo = 'bar';
164
164
165
165
const _sfc_main = {
166
166
__name : ' script-setup' ,
167
- setup (__props ) {
167
+ setup (__props , { expose: __expose }) {
168
+ __expose();
168
169
169
170
170
- return ( _ctx , _cache ) => {
171
- return ( openBlock (), createElementBlock ( " div " , null , _hoisted_2 ))
172
- }
171
+ const __returned__ = { foo };
172
+ Object . defineProperty ( __returned__ , ' __isScriptSetup ' , { enumerable: false , value: true });
173
+ return __returned__
173
174
}
174
175
175
176
};
176
- var scriptSetup = /*#__PURE__*/_export_sfc(_sfc_main, [['__file','#FILE#']]);
177
+
178
+ const _hoisted_1 = /*#__PURE__*/createElementVNode("h1", null, "Hello World", -1 /* HOISTED */);
179
+ const _hoisted_2 = [
180
+ _hoisted_1
181
+ ];
182
+
183
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
184
+ return (openBlock (), createElementBlock (" div" , null , [... _hoisted_2 ]))
185
+ }
186
+ var scriptSetup = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file','#FILE#']]);
177
187
178
188
export { scriptSetup as default } ;
179
189
"
@@ -208,31 +218,21 @@ exports[`transform > fixtures > tests/fixtures/script-setup-ts.vue > isProductio
208
218
"//script-setup-ts.js
209
219
import { defineComponent , openBlock , createElementBlock , createElementVNode } from 'vue';
210
220
211
- const _hoisted_1 = /* @__PURE__ */ createElementVNode(
212
- "h1",
213
- null,
214
- "Hello World",
215
- -1
216
- /* HOISTED */
217
- );
218
- const _hoisted_2 = [
219
- _hoisted_1
220
- ];
221
221
const str = "bar";
222
222
var script_setup_ts_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
223
223
__name : " script-setup-ts" ,
224
224
props : {
225
- foo: {},
226
- bar: {},
227
- baz: { type: Boolean }
225
+ foo: { type: String , required: true },
226
+ bar: { type: Number , required: true },
227
+ baz: { type: Boolean , required: true }
228
228
},
229
229
setup (__props , { expose: __expose }) {
230
230
__expose({
231
231
str
232
232
});
233
- return ( _ctx , _cache ) => {
234
- return openBlock (), createElementBlock ( " div " , null ,
77F4
_hoisted_2 );
235
- } ;
233
+ const __returned__ = { str };
234
+ Object . defineProperty ( __returned__ , " __isScriptSetup " , { enumerable: false , value: true } );
235
+ return __returned__ ;
236
236
}
237
237
});
238
238
@@ -244,7 +244,20 @@ var _export_sfc = (sfc, props) => {
244
244
return target ;
245
245
} ;
246
246
247
- var scriptSetupTs = /* @__PURE__ */ _export_sfc(script_setup_ts_vue_vue_type_script_setup_true_lang_default, [["__file", '#FILE#']]);
247
+ const _hoisted_1 = /* @__PURE__ */ createElementVNode(
248
+ "h1",
249
+ null,
250
+ "Hello World",
251
+ -1
252
+ /* HOISTED */
253
+ );
254
+ const _hoisted_2 = [
255
+ _hoisted_1
256
+ ];
257
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
258
+ return openBlock (), createElementBlock (" div" , null , [... _hoisted_2 ]);
259
+ }
260
+ var scriptSetupTs = /* @__PURE__ */ _export_sfc(script_setup_ts_vue_vue_type_script_setup_true_lang_default, [["render", _sfc_render], ["__file", '#FILE#']]);
248
261
249
262
export { scriptSetupTs as default } ;
250
263
"
0 commit comments