@@ -4,7 +4,7 @@ import { beforeAll, describe, expect, test } from '@rstest/core';
44import { buildAndGetResults , type BuildResult } from 'test-helper' ;
55
66// '__file' path can't be normalized on win32.
7- describe . runIf ( platform ( ) !== 'win32' ) . skip ( 'ESM' , async ( ) => {
7+ describe . runIf ( platform ( ) !== 'win32' ) ( 'ESM' , async ( ) => {
88 let jsResult : BuildResult ;
99 let cssResult : BuildResult ;
1010
@@ -140,13 +140,16 @@ describe.runIf(platform() !== 'win32').skip('ESM', async () => {
140140 test ( 'bundleless' , async ( ) => {
141141 expect ( jsResult . contents . esm0 ) . toMatchInlineSnapshot ( `
142142 {
143- "<ROOT>/tests/integration/vue/dist/bundleless/Button/Button.js": "import "./style.css";
144- import { createElementBlock, openBlock, ref, toDisplayString } from "vue";
145- const _00_2Fplugin_vue_2Fexport_helper = (sfc, props)=>{
143+ "<ROOT>/tests/integration/vue/dist/bundleless/544.js": "const _00_2Fplugin_vue_2Fexport_helper = (sfc, props)=>{
146144 const target = sfc.__vccOpts || sfc;
147145 for (const [key, val] of props)target[key] = val;
148146 return target;
149147 };
148+ export { _00_2Fplugin_vue_2Fexport_helper };
149+ ",
150+ "<ROOT>/tests/integration/vue/dist/bundleless/Button/Button.js": "import "./style.css";
151+ import { createElementBlock, openBlock, ref, toDisplayString } from "vue";
152+ import { _00_2Fplugin_vue_2Fexport_helper } from "../544.js";
150153 const _sfc_main = {
151154 __name: 'Button',
152155 setup (__props, { expose: __expose }) {
@@ -179,17 +182,12 @@ describe.runIf(platform() !== 'win32').skip('ESM', async () => {
179182 "<ROOT>/tests/integration/vue/src/Button/Button.vue"
180183 ]
181184 ]);
182- export { Button as default } ;
185+ export default Button ;
183186 ",
184- "<ROOT>/tests/integration/vue/dist/bundleless/Button/index.js": "import Button from "./Button.js";
185- export { Button as default };
187+ "<ROOT>/tests/integration/vue/dist/bundleless/Button/index.js": "export { default } from "./Button.js";
186188 ",
187189 "<ROOT>/tests/integration/vue/dist/bundleless/Card.js": "import { createElementBlock, openBlock, ref, toDisplayString } from "vue";
188- const _00_2Fplugin_vue_2Fexport_helper = (sfc, props)=>{
189- const target = sfc.__vccOpts || sfc;
190- for (const [key, val] of props)target[key] = val;
191- return target;
192- };
190+ import { _00_2Fplugin_vue_2Fexport_helper } from "./544.js";
193191 const _sfc_main = {
194192 __name: 'Card',
195193 setup (__props, { expose: __expose }) {
@@ -222,11 +220,10 @@ describe.runIf(platform() !== 'win32').skip('ESM', async () => {
222220 "<ROOT>/tests/integration/vue/src/Card.vue"
223221 ]
224222 ]);
225- export { Card as default } ;
223+ export default Card ;
226224 ",
227- "<ROOT>/tests/integration/vue/dist/bundleless/index.js": "import Button from "./Button/index.js";
228- import Card from "./Card.js";
229- export { Button, Card };
225+ "<ROOT>/tests/integration/vue/dist/bundleless/index.js": "export { default as Button } from "./Button/index.js";
226+ export { default as Card } from "./Card.js";
230227 ",
231228 }
232229 ` ) ;
0 commit comments