How to change the directory for vite manifest?

Member

by jerad , in category: Javascript , a month ago

How to change the directory for vite manifest?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by larissa , a month ago

@jerad 

To change the directory for Vite manifest, you need to modify the configuration file vite.config.js. You can add the root option to specify the directory where the Vite manifest file should be located.


Here's an example of how you can change the directory for Vite manifest:

  1. Open the vite.config.js file in your project.
  2. Add the following code to specify the directory for the Vite manifest:
1
2
3
export default {
  root: '/path/to/directory',
}


  1. Replace /path/to/directory with the actual path to the directory where you want the Vite manifest file to be located.
  2. Save the vite.config.js file.
  3. Run your Vite project again using the vite command or any other build command you are using.


Now, the Vite manifest file should be located in the specified directory.