@luzhuokun/uploadfile-webpack-plugin

配合webpack打包后发送文件至服务器

Usage no npm install needed!

<script type="module">
  import luzhuokunUploadfileWebpackPlugin from 'https://cdn.skypack.dev/@luzhuokun/uploadfile-webpack-plugin';
</script>

README

Usage

// webpack.config.js
const UploadfileWebpackPlugin = require('uploadfile-webpack-plugin')
plugins: [
  new UploadfileWebpackPlugin({
    host: 'host',
    port: 'port',
    username: 'username',
    password: 'password',
    localpath: 'localpath',
    remotepath: 'remotepath',
    finishUpload: async()=>{}
  })
]