@@ -14,6 +14,7 @@ import {
14
14
createSerializedOptions ,
15
15
getAllAddOns ,
16
16
getFrameworkById ,
17
+ getFrameworkByName ,
17
18
getFrameworks ,
18
19
initAddOn ,
19
20
initStarter ,
@@ -258,14 +259,18 @@ Remove your node_modules directory and package lock file and re-install.`,
258
259
'--framework <type>' ,
259
260
`project framework (${ availableFrameworks . join ( ', ' ) } )` ,
260
261
( value ) => {
261
- if ( ! availableFrameworks . includes ( value ) ) {
262
+ if (
263
+ ! availableFrameworks . some (
264
+ ( f ) => f . toLowerCase ( ) === value . toLowerCase ( ) ,
265
+ )
266
+ ) {
262
267
throw new InvalidArgumentError (
263
268
`Invalid framework: ${ value } . Only the following are allowed: ${ availableFrameworks . join ( ', ' ) } ` ,
264
269
)
265
270
}
266
271
return value
267
272
} ,
268
- defaultFramework || 'react-cra ' ,
273
+ defaultFramework || 'React ' ,
269
274
)
270
275
}
271
276
@@ -334,7 +339,7 @@ Remove your node_modules directory and package lock file and re-install.`,
334
339
program . action ( async ( projectName : string , options : CliOptions ) => {
335
340
if ( options . listAddOns ) {
336
341
const addOns = await getAllAddOns (
337
- getFrameworkById ( options . framework || defaultFramework || 'react-cra ' ) ! ,
342
+ getFrameworkByName ( options . framework || defaultFramework || 'React ' ) ! ,
338
343
defaultMode ||
339
344
convertTemplateToMode ( options . template || defaultTemplate ) ,
340
345
)
@@ -354,8 +359,8 @@ Remove your node_modules directory and package lock file and re-install.`,
354
359
...options ,
355
360
} as CliOptions
356
361
357
- cliOptions . framework = getFrameworkById (
358
- options . framework || defaultFramework || 'react-cra ' ,
362
+ cliOptions . framework = getFrameworkByName (
363
+ options . framework || defaultFramework || 'React ' ,
359
364
) ! . id
360
365
361
366
if ( defaultMode ) {
0 commit comments