0.0.3 • Published 3 years ago

vite-plugin-intermediary v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

vite-plugin-intermediary

中文

Automatically create an import and export transit file, Usually used to unify import paths

img

Requirement

  • node version: >=14

Feature

  • Additional write, does not affect the actively exported content
  • Modify the export content to trigger the transfer file update

Install

pnpm i vite-plugin-intermediary -D

Usage

import { defineConfig } from 'vite'
import Intermediary from 'vite-plugin-intermediary'
export default defineConfig({
  plugins: [Intermediary({
    dir:'src/components',
    output:'index.ts',
  })]
})

Options

export interface Intermediary {
  dir: string, // watcher directive
  include?: includeOptins[] // file type list
  output: string, 
  auto?:boolean, //if true scan dir and create intermediary file to first run vite
}
export type includeOptins = 'ts' | 'js' | 'vue' | 'md'
0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago