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

0.4.0 • Public • Published

vite-copy-plugin

试了几个资源复制插件,不是没用就是不合适,于是便有了此插件

安装

npm i vite-copy-plugin

使用

import CopyPlugin from "vite-copy-plugin";

// vite 配置
export default defineConfig({
  plugins: [
    CopyPlugin([
      // 目录复制
      {from: 'src/static', to: 'dist/static'},
      // 文件复制到目录(空及取vite配置的build.outDir 默认 dist)
      {from: 'src/static/style.css', to: ''}, 
      // 文件复制文件
      {from: 'src/static/style.css', to: 'dist/index.css'}, 
    ])
  ],
});

Readme

Keywords

Package Sidebar

Install

npm i vite-copy-plugin

Weekly Downloads

43

Version

0.4.0

License

MIT

Unpacked Size

4.22 kB

Total Files

4

Last publish

Collaborators

  • cc-better