mistjs / vite-plugin-copy-files

this is less copy plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vite-plugin-copy-files

This package can help you move some files that do not need to be packaged to the corresponding packaging directory.

Install

# npm
npm i -D vite-plugin-copy-files
# pnpm 
pnpm add -D vite-plugin-copy-files
# yarn
yarn add -D vite-plugin-copy-files

Usage

Add the following to your .vite.config.js or .vite.config.ts file:

import copyFiles from 'vite-plugin-copy-files'
export default {
  plugins: [copyFiles({
    include: [/\.(less|css|scss)$/],
    exclude: [/node_modules/],
  })],
}

Options

include

  • Array: A list of patterns or string to include.
  • default: [/\.(less|css|scss)$/]

exclude

  • Array: A list of patterns or string to exclude.
  • default: [/node_modules/]

root

  • String: The root directory to copy files from.
  • default: with vite config option root

entry

  • String: The entry directory to copy files from.
  • default: src if you directory is not named src you need to specify the entry directory.

formatFilePath

  • Function: A custom file output path Function. (file:string)=>string

About

this is less copy plugin

License:MIT License


Languages

Language:TypeScript 74.2%Language:JavaScript 8.6%Language:HTML 7.1%Language:Shell 5.0%Language:Vue 4.5%Language:Less 0.7%