Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
110
rated 0 times [  116] [ 6]  / answers: 1 / hits: 17746  / 2 Years ago, fri, april 1, 2022, 12:00:00

I created a project template using vite.


Under package.json, I saw this;


  "scripts": {
"dev": "vite",
"build": "vue-tsc --noEmit && vite build",
"preview": "vite preview"
},

What's the difference between vite and vite preview? When should one use vite instead of vite preview?


More From » vue.js

 Answers
16

dev starts a local web server with HMR for development


build builds the project, and outputs to the folder ./dist


preview start a local web server that serves the built solution from ./dist for previewing


[#50049] Thursday, January 27, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alejandro

Total Points: 231
Total Questions: 102
Total Answers: 107

Location: Jordan
Member since Wed, Jun 17, 2020
4 Years ago
alejandro questions
Mon, Jul 18, 22, 00:00, 2 Years ago
Fri, Sep 18, 20, 00:00, 4 Years ago
Thu, Sep 10, 20, 00:00, 4 Years ago
;