使用 create-next-app 脚手架工具创建 next js 项目

2 min read

使用 create-next-app 脚手架工具,你可以直接运行

npx create-next-app@latest 

 yarn create next-app 

来创建一个项目。

如果你想使用 TypeScript,你可以添加 --typescript 参数,例如

 npx create-next-app@latest --typescript 

yarn create next-app --typescript