简体   繁体   English

命令 vite start 是否比 node./index.js 有一些优势

[英]Does the command vite start have some advantages over node ./index.js

I'm launching a new SvelteKit app for production and came across the vite start command.我正在为生产启动一个新的 SvelteKit 应用程序,并遇到了vite start命令。

I'm always starting the app with node file.js .我总是用 node file.js启动应用程序。

Does the vite command have extra advantages over basic node? vite 命令是否比基本节点有额外的优势?

I'm not getting any wiser by the documentation or source code.我对文档或源代码没有任何了解。

Vite provides a development server which is optimized for quick development and iteration. Vite 提供了一个针对快速开发和迭代进行了优化的开发服务器。

The main advantages probably are:主要优点大概是:

  • Fast startup because it does not bundle the code first快速启动,因为它不首先捆绑代码
  • Parts of the running application can be updated via Hot Module Replacement (eg a Svelte component)正在运行的应用程序的某些部分可以通过热模块更换(例如 Svelte 组件)进行更新
  • Related to that: Automatic update of the page when a module is replaced与此相关:更换模块时自动更新页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM