|
1 | 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
3 | | -exports[`rollup > autoAddExts 1`] = ` |
| 3 | +exports[`rollup > auto add exts 1`] = ` |
4 | 4 | "// main.js |
5 | 5 | function Component() { |
6 | 6 | return /* @__PURE__ */ React.createElement("div", null, "I'm a div in a tsx component!"); |
@@ -45,6 +45,26 @@ export type Str = string; |
45 | 45 | " |
46 | 46 | `; |
47 | 47 |
|
| 48 | +exports[`rollup > don't add exts, but keep 1`] = ` |
| 49 | +"// main.d.ts |
| 50 | +export type {} from './types.js'; |
| 51 | +export type {} from './types.js'; |
| 52 | +export type {} from './tsx.js'; |
| 53 | +export type {} from './tsx.jsx'; |
| 54 | +export type {} from './tsx.js'; |
| 55 | +export type {} from './tsx.jsx'; |
| 56 | +
|
| 57 | +// main.js |
| 58 | +
|
| 59 | +
|
| 60 | +// tsx.d.ts |
| 61 | +export type A = string; |
| 62 | +
|
| 63 | +// types.d.ts |
| 64 | +export type Str = string; |
| 65 | +" |
| 66 | +`; |
| 67 | + |
48 | 68 | exports[`rollup > generate basic 1`] = ` |
49 | 69 | "// main.js |
50 | 70 | function Component() { |
@@ -77,156 +97,3 @@ export type Num = Num2; |
77 | 97 | export type Num2 = number; |
78 | 98 | " |
79 | 99 | `; |
80 | | - |
81 | | -exports[`rollup > no index path 1`] = ` |
82 | | -"// foo/index.d.ts |
83 | | -export type Foo = string; |
84 | | -
|
85 | | -
|
86 | | -// index.d.ts |
87 | | -export type Bar = string; |
88 | | -
|
89 | | -
|
90 | | -// main.d.ts |
91 | | -export {} from './foo/index.js'; |
92 | | -export {} from './index.js'; |
93 | | -
|
94 | | -
|
95 | | -// main.js |
96 | | -
|
97 | | -" |
98 | | -`; |
99 | | - |
100 | | -exports[`rollup > with exts 1`] = ` |
101 | | -"// main.d.ts |
102 | | -export type {} from './types.js'; |
103 | | -export type {} from './types.js'; |
104 | | -export type {} from './tsx.js'; |
105 | | -export type {} from './tsx.jsx'; |
106 | | -export type {} from './tsx.js'; |
107 | | -export type {} from './tsx.jsx'; |
108 | | -
|
109 | | -// main.js |
110 | | -
|
111 | | -
|
112 | | -// tsx.d.ts |
113 | | -export type A = string; |
114 | | -
|
115 | | -// types.d.ts |
116 | | -export type Str = string; |
117 | | -" |
118 | | -`; |
119 | | - |
120 | | -exports[`rollup > write entry-points (#22) 1`] = ` |
121 | | -"// a/ComponentA/ComponentA/index.d.ts |
122 | | -import React from 'react'; |
123 | | -export { a } from '../../Models/model/index.js'; |
124 | | -interface ComponentAProps { |
125 | | - test: string; |
126 | | -} |
127 | | -export declare function ComponentA(props: ComponentAProps): React.JSX.Element; |
128 | | -//# sourceMappingURL=index.d.ts.map |
129 | | -
|
130 | | -// a/ComponentA/ComponentA/index.d.ts.map |
131 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../fixtures/entry-points-22/a/ComponentA/ComponentA.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAA;AAEnC,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGpE"} |
132 | | -
|
133 | | -// a/ComponentA/ComponentA/index.js |
134 | | -import React from 'react'; |
135 | | -
|
136 | | -function ComponentA(props) { |
137 | | - const { test } = props; |
138 | | - return /* @__PURE__ */ React.createElement(React.Fragment, null, "ComponentA: ", test); |
139 | | -} |
140 | | -
|
141 | | -export { ComponentA }; |
142 | | -
|
143 | | -
|
144 | | -// a/Models/model/index.d.ts |
145 | | -export interface MyModel { |
146 | | - some: string; |
147 | | -} |
148 | | -export declare const a = "b"; |
149 | | -//# sourceMappingURL=index.d.ts.map |
150 | | -
|
151 | | -// a/Models/model/index.d.ts.map |
152 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../fixtures/entry-points-22/a/Models/model.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;CACb;AACD,eAAO,MAAM,CAAC,MAAM,CAAA"} |
153 | | -
|
154 | | -// a/index.d.ts |
155 | | -export { ComponentA } from "./ComponentA/ComponentA/index.jsx"; |
156 | | -//# sourceMappingURL=index.d.ts.map |
157 | | -
|
158 | | -// a/index.d.ts.map |
159 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../fixtures/entry-points-22/a/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"} |
160 | | -
|
161 | | -// a/index.js |
162 | | -export { ComponentA } from './ComponentA/ComponentA/index.js'; |
163 | | -
|
164 | | -
|
165 | | -// b/ComponentB/ComponentB/index.d.ts |
166 | | -import React from "react"; |
167 | | -interface ComponentBProps { |
168 | | - test: string; |
169 | | -} |
170 | | -export declare function ComponentB(props: ComponentBProps): React.JSX.Element; |
171 | | -export {}; |
172 | | -//# sourceMappingURL=index.d.ts.map |
173 | | -
|
174 | | -// b/ComponentB/ComponentB/index.d.ts.map |
175 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../fixtures/entry-points-22/b/ComponentB/ComponentB.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAGpE"} |
176 | | -
|
177 | | -// b/ComponentB/ComponentB/index.js |
178 | | -import React from 'react'; |
179 | | -
|
180 | | -function ComponentB(props) { |
181 | | - const { test } = props; |
182 | | - return /* @__PURE__ */ React.createElement(React.Fragment, null, "ComponentB: ", test); |
183 | | -} |
184 | | -
|
185 | | -export { ComponentB }; |
186 | | -
|
187 | | -
|
188 | | -// b/index.d.ts |
189 | | -export { ComponentB } from "./ComponentB/ComponentB/index.jsx"; |
190 | | -//# sourceMappingURL=index.d.ts.map |
191 | | -
|
192 | | -// b/index.d.ts.map |
193 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../fixtures/entry-points-22/b/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC"} |
194 | | -
|
195 | | -// b/index.js |
196 | | -export { ComponentB } from './ComponentB/ComponentB/index.js'; |
197 | | -" |
198 | | -`; |
199 | | - |
200 | | -exports[`rollup > write entry-points (#34) 1`] = ` |
201 | | -"// foo/bar.d.ts |
202 | | -export type * from './bar/baz.js'; |
203 | | -export type * from '../index.js'; |
204 | | -//# sourceMappingURL=bar.d.ts.map |
205 | | -
|
206 | | -// foo/bar.d.ts.map |
207 | | -{"version":3,"file":"bar.d.ts","sourceRoot":"","sources":["../../../../fixtures/entry-points-34/foo/bar/bar.ts"],"names":[],"mappings":"AAAA,mBAAmB,OAAO,CAAA;AAC1B,mBAAmB,YAAY,CAAA"} |
208 | | -
|
209 | | -// foo/bar.js |
210 | | -
|
211 | | -
|
212 | | -
|
213 | | -// foo/bar/baz.d.ts |
214 | | -export type * from '../bar.js'; |
215 | | -export type * from '../../index.js'; |
216 | | -//# sourceMappingURL=baz.d.ts.map |
217 | | -
|
218 | | -// foo/bar/baz.d.ts.map |
219 | | -{"version":3,"file":"baz.d.ts","sourceRoot":"","sources":["../../../../../fixtures/entry-points-34/foo/bar/baz.ts"],"names":[],"mappings":"AAAA,mBAAmB,UAAU,CAAA;AAC7B,mBAAmB,YAAY,CAAA"} |
220 | | -
|
221 | | -// index.d.ts |
222 | | -export * from './foo/bar.js'; |
223 | | -export * from './foo/bar/baz.js'; |
224 | | -//# sourceMappingURL=index.d.ts.map |
225 | | -
|
226 | | -// index.d.ts.map |
227 | | -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../fixtures/entry-points-34/main.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA"} |
228 | | -
|
229 | | -// index.js |
230 | | -
|
231 | | -" |
232 | | -`; |
0 commit comments