File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1510,6 +1510,28 @@ pub const Command = struct {
1510
1510
1511
1511
const template_name = positionals [0 ];
1512
1512
1513
+ // if template_name is "react"
1514
+ // print message telling user to use "bun create vite" instead
1515
+ if (strings .eqlComptime (template_name , "react" )) {
1516
+ Output .prettyErrorln (
1517
+ \\The "react" template has been deprecated.
1518
+ \\It is recommended to use "react-app" or "vite" instead.
1519
+ \\
1520
+ \\To create a project using Create React App, run
1521
+ \\
1522
+ \\ bun create react-app
1523
+ \\
1524
+ \\To create a React project using Vite, run
1525
+ \\
1526
+ \\ bun create vite
1527
+ \\
1528
+ \\Then select "React" from the list of frameworks.
1529
+ \\
1530
+ , .{});
1531
+ Global .exit (1 );
1532
+ return ;
1533
+ }
1534
+
1513
1535
const use_bunx = ! HardcodedNonBunXList .has (template_name ) and
1514
1536
(! strings .containsComptime (template_name , "/" ) or
1515
1537
strings .startsWithChar (template_name , '@' ));
You can’t perform that action at this time.
0 commit comments