How Can I Choose a Custom Folder for My Vite Projects?

0
75
Asked By CreativePineapple42 On

I'm trying to figure out how to set up Vite so that when I create a new project using `npm create vite@latest`, it saves the project files in a specific folder of my choice instead of the default user directory. I want to avoid manually moving files each time I create a project. Is there a way to achieve this automatically?

1 Answer

Answered By CuriousCactus27 On

You can actually just navigate to the folder where you want the project to be created before running the Vite command. For example, you could `cd` into your desired folder, say `My-project`, and then run `npm create vite@latest`. This way, the project will automatically be set up in that folder instead of your user directory!

CreativePineapple42 -

Ohhh, didn't think of that! Thanks!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.