@yors/vite-plugin-mini-js
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@yors/vite-plugin-mini-js

a vite plugin library package for yors packages to compress js files in dist and do more.

Features

  • compress js files in dist and add the 'min' label to the file name in front of the file name suffix.
  • add banner infomation to these js files

Usage

npm i @yors/vite-plugin-mini-js --save-dev
yarn add @yors/vite-plugin-mini-js -D
pnpm add @yors/vite-plugin-mini-js -D
interface VitePluginNanoOption {
  [attr: string]: any;
  disable?: boolean;
  label: string;
  skipExt: string;
  allowExt: string;
  banner: string;
}
import { defineConfig } from "vite";
import nanoMiniDist from "@yors/vite-plugin-mini-js";
let plugins = [
  nanoMiniDist({
    disable: false,
    allowExt: ".js,.cjs",
    skipExt: ".test.js,.test.cjs",
    // banner:'your banner here',
  }),
];
export default defineConfig({
  plugins: plugins,
});

Package Sidebar

Install

npm i @yors/vite-plugin-mini-js

Weekly Downloads

9

Version

1.1.0

License

MIT

Unpacked Size

13.3 kB

Total Files

11

Last publish

Collaborators

  • hualei