Skip to content

larryzhao/vite-plugin-copy-manifest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-copy-manifest

Copies the manifest.json file generated by vite build to a specific location.

Vite will generate a manifest file after vite build, in build.outDir. There's no configuration to change the destination dir for the generation of the manfest file. Sometimes you need this manifest file in a specific location. You could use this plugin to copy the generated manifest file to the destination location you specified.

Install

npm i vite-plugin-copy-manifest -D

Usage

import copyManifest from 'vite-plugin-copy-manifest';

export default {
  build: {
    manifest: "assets.json",
    outDir: "./static/dist/",
  },
  plugins: [
    // specify destDir
    // the manifest file `assets.json` will be copied to `./data/`
    copyManifest({ destDir: './data/' })
  ]
}

License

MIT License © 2023-PRESENT @larryzhao

About

a vite plugin to copy manifest json file to destination.

Resources

License

Stars

Watchers

Forks

Packages

No packages published