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

0.0.1 • Public • Published

vite-plugin-ignore-public

NPM version

Ignore public directories at build time

Motivation

When developing with the vite development environment, you may need to use assets under public. If the target of the build does not depend on this part of the assets, ignore some of them at build time and do not copy them to the dist directory. vite will duplicate them by default, and there is no way to turn off this behavior yet, use this plugin to fix it.

Install

npm i -D vite-plugin-ignore-public

Add plugin to your vite.config.ts:

// vite.config.ts
import { IgnorePublicPlugin } from 'vite-plugin-ignore-public'

export default {
  plugins: [
    IgnorePublicPlugin(),
  ]
}

/vite-plugin-ignore-public/

    Package Sidebar

    Install

    npm i vite-plugin-ignore-public

    Weekly Downloads

    5

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    5.68 kB

    Total Files

    6

    Last publish

    Collaborators

    • guangzan