@@ -70,9 +70,9 @@ describe('transformCjsImport', () => {
70
70
)
71
71
) . toBe (
72
72
'import __vite__cjsImport0_react from "./node_modules/.vite/deps/react.js"; ' +
73
- 'const useState = __vite__cjsImport0_react["useState"]; ' +
74
- 'const Component = __vite__cjsImport0_react["Component"]; ' +
75
- 'export { useState, Component }'
73
+ 'const __vite__cjsExport_useState = __vite__cjsImport0_react["useState"]; ' +
74
+ 'const __vite__cjsExport_Component = __vite__cjsImport0_react["Component"]; ' +
75
+ 'export { __vite__cjsExport_useState as useState, __vite__cjsExport_Component as Component }'
76
76
)
77
77
78
78
expect (
@@ -84,9 +84,9 @@ describe('transformCjsImport', () => {
84
84
)
85
85
) . toBe (
86
86
'import __vite__cjsImport0_react from "./node_modules/.vite/deps/react.js"; ' +
87
- 'const useStateAlias = __vite__cjsImport0_react["useState"]; ' +
88
- 'const ComponentAlias = __vite__cjsImport0_react["Component"]; ' +
89
- 'export { useStateAlias, ComponentAlias }'
87
+ 'const __vite__cjsExport_useStateAlias = __vite__cjsImport0_react["useState"]; ' +
88
+ 'const __vite__cjsExport_ComponentAlias = __vite__cjsImport0_react["Component"]; ' +
89
+ 'export { __vite__cjsExport_useStateAlias as useStateAlias, __vite__cjsExport_ComponentAlias as ComponentAlias }'
90
90
)
91
91
} )
92
92
@@ -108,8 +108,8 @@ describe('transformCjsImport', () => {
108
108
)
109
109
) . toBe (
110
110
'import __vite__cjsImport0_react from "./node_modules/.vite/deps/react.js"; ' +
111
- 'const React = __vite__cjsImport0_react.__esModule ? __vite__cjsImport0_react.default : __vite__cjsImport0_react; ' +
112
- 'export { React }'
111
+ 'const __vite__cjsExport_React = __vite__cjsImport0_react.__esModule ? __vite__cjsImport0_react.default : __vite__cjsImport0_react; ' +
112
+ 'export { __vite__cjsExport_React as React }'
113
113
)
114
114
115
115
expect (
0 commit comments