0.1.2 • Published 11 months ago

unplugin-copy v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

unplugin-copy

⚠️ The project is still in an experimental state for rapid iteration, configuration options are subject to change!

⚠️ 该项目仍然处于快速迭代的实验性状态,配置选项会随时更改!

NPM version

Install

shiyanxing

npm i unplugin-copy
// vite.config.ts
import copy from 'unplugin-copy/vite'

export default defineConfig({
  plugins: [
    copy({
      src: './node_modules/vue/dist/*',
      dest: 'vue'
    }),
  ],
})

// rollup.config.js
import copy from 'unplugin-copy/rollup'

export default {
  plugins: [
    copy({
      src: './node_modules/vue/dist/*',
      dest: 'vue'
    }),
  ],
}

// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    copy({
      src: './node_modules/vue/dist/*',
      dest: 'vue'
    }),
  ]
}

// nuxt.config.js
export default {
  buildModules: [
    ['unplugin-copy/nuxt', {
      src: './node_modules/vue/dist/*',
      dest: 'vue'
    }],
  ],
}

This module works for both Nuxt 2 and Nuxt Vite

// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('unplugin-copy/webpack')(
        {
          src: './node_modules/vue/dist/*',
          dest: 'vue'
        },
      ),
    ],
  },
}

// esbuild.config.js
import { build } from 'esbuild'
import copy from 'unplugin-copy/esbuild'

build({
  plugins: [
    copy({
      src: './node_modules/vue/dist/*',
      dest: 'vue'
    }),
  ],
})

0.1.2

11 months ago

0.1.1

11 months ago

0.1.0

11 months ago