英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论