Giter Site home page Giter Site logo

vite-plugin-upload-cos's Introduction

vite-plugin-upload-cos

vite-plugin-upload-cos, vite插件,兼容rollup插件,cos插件, 打包构建完成之后将资源上传到cos, 可以在vite或者rollup中使用

安装

npm i -D vite-plugin-upload-cos
// vite.config.ts
import uploadCosPlugin from 'vite-plugin-upload-cos'

export default {
   build: {
    rollupOptions: {
      plugins: [uploadCosPlugin({
        cosBaseDir: `viteh5`, /* 存放到cos的地址, 这里存放到viteh5文件夹里 */
        bucket: 'test-jayhowe-1111111111', /* 上传cos的 bucket */
        region: 'ap-guangzhou', /* 上传cos的 region */
        SecretId: 'xxx',  /* 上传cos的 SecretId */
        SecretKey: 'xxx', /* 上传cos的 SecretKey */
        uploadDir: 'dist', /* 可选项,不填则默认上传dist文件夹里面的全部文件到cos */
        excludes: [
          'index.html', /* 可选项,忽略上传到cos的文件, 不填则默认上传指定文件夹的全部文件 */
        ]
    })],
    },
  },
}

License

MIT License © 2021 JayHowe

vite-plugin-upload-cos's People

Contributors

jayhowe avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

evening97 choukin

vite-plugin-upload-cos's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.