vite-plugin-public
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

vite-plugin-public

npm Code style: Prettier Donate

Postprocessing for /public

 

Usage

The publicHash plugin helps you add content hashes to all or some files from the /public directory.

Note: This plugin depends on #1647 and #1675

Options

  • ignore?: RegExp
    Matching files are not hashed.

  • skipRename?: boolean
    Rewrite URLs but skip renaming files in outDir.
    Useful when your Vite config is loaded more than once.

import {publicHash} from 'vite-plugin-public'

export default {
  plugins: [
    publicHash({
      ignore: /^static\//,
    }),
  ]
}

Other plugins may be added in the future. Ideas and contributions welcome!

Readme

Keywords

Package Sidebar

Install

npm i vite-plugin-public

Weekly Downloads

2

Version

2.0.2

License

MIT

Unpacked Size

8.89 kB

Total Files

7

Last publish

Collaborators

  • aleclarson