How to change the directory for vite manifest?

Member

by jerad , in category: Javascript , a year ago

How to change the directory for vite manifest?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by larissa , a year 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.

Related Threads:

How to make vite ignore a directory?
How to change git root directory?
How to change base directory properly in .htaccess?
How to dynamically change title in vite react.js?
How to change vite dev server asset base path?
How to update vite 3 project to vite 4?