create vite@latest 与 create-next-app 与 create-react-app 的使用差异

huangapple go评论63阅读模式
英文:

Difference in using create vite@latest vs create-next-app vs create-react-app

问题

我知道使用"create react-app"比使用"create vite@latest"慢得多,而使用"create next-app"则指定你想要使用Next.js框架,但那么使用"create vite@latest"与"create next-app"相比呢?"create next-app"也比"create vite@latest"慢吗?我可以先使用"create vite@latest",然后再安装Next.js框架吗?因为我只看到在使用"create next-app"初始化React应用时才出现Next.js的示例。

英文:

I know that using create react-app is much slower than using create vite@latest and that using create next-app specifies you want to use the next.js framework, but what about using create vite@latest vs create next-app. Is create-next-app also slower than create vite@latest? and can I use create vite@latest first and then install the next.js framework? because I only see examples of next.js being used when react apps are initialized with create next-app

答案1

得分: 8

根据我所知,Vite 和 Next.js 不兼容。因为 Next.js 对 webpack 有强烈依赖,而 webpack 和 Vite 扮演了相似的角色。你不能同时使用它们。

在可预见的未来,Vite 和 Next.js 不能一起使用。然而,Next.js 目前也正在推出一个新的编译器,声称可以达到或超越 Vite 的速度。

英文:

As far as I know, vite and next.js are not compatible. Because next.js has a strong dependency on webpack, webpack and vite have similar roles. You can't use them at the same time.

For the foreseeable future, vite and next.js cannot be used together. However, next.js is also currently shipping a new compiler that claims to meet or exceed the speed of vite.

huangapple
  • 本文由 发表于 2023年2月18日 16:57:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/75492238.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定