File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
packages/openapi-ts/src/generate Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,12 @@ const infixDotGenToFiles = (outputPath: string) => {
142
142
* Creates a `client` folder containing the same modules as the client package.
143
143
*/
144
144
export const generateClientBundle = ( {
145
+ legacy,
145
146
outputPath,
146
147
plugin,
147
148
tsConfig,
148
149
} : {
150
+ legacy ?: boolean ;
149
151
outputPath : string ;
150
152
plugin : DefinePlugin < Client . Config & { name : string } > [ 'Config' ] ;
151
153
tsConfig : ts . ParsedCommandLine | null ;
@@ -162,7 +164,9 @@ export const generateClientBundle = ({
162
164
const coreDistPath = path . resolve ( packageRoot , 'dist' , 'clients' , 'core' ) ;
163
165
copyRecursivePnP ( coreDistPath , coreOutputPath ) ;
164
166
165
- infixDotGenToFiles ( coreOutputPath ) ;
167
+ if ( legacy !== true ) {
168
+ infixDotGenToFiles ( coreOutputPath ) ;
169
+ }
166
170
167
171
if ( shouldAppendJs ) {
168
172
const coreFiles = fs . readdirSync ( coreOutputPath ) ;
@@ -182,7 +186,9 @@ export const generateClientBundle = ({
182
186
) ;
183
187
copyRecursivePnP ( clientDistPath , clientOutputPath ) ;
184
188
185
- infixDotGenToFiles ( clientOutputPath ) ;
189
+ if ( legacy !== true ) {
190
+ infixDotGenToFiles ( clientOutputPath ) ;
191
+ }
186
192
187
193
if ( shouldAppendJs ) {
188
194
const clientFiles = fs . readdirSync ( clientOutputPath ) ;
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export const generateLegacyOutput = async ({
68
68
clientPlugin . config . bundle
69
69
) {
70
70
generateClientBundle ( {
71
+ legacy : false ,
71
72
outputPath,
72
73
// @ts -expect-error
73
74
plugin : clientPlugin ,
You can’t perform that action at this time.
0 commit comments