1.0.3 • Published 4 years ago
publish-webpack-plugin v1.0.3
webpack SFTP方式上传文件插件
安装
npm install --save-dev publish-webpack-plugin
使用
const PublishWebpackPlugin = require('publish-webpack-plugin')
const webpackConfig = {
plugins: [{
new PublishWebpackPlugin(options)
}]
}
options
new PublishWebpackPlugin({
isPublish: false, // 是否发布
host: '', // 服务器ip,域名
port: 22, // 端口
username: '', // 用户
password: '', // 密码
path: '', // 本地路径
excludedFolders: '', // 排除目录
remoteDir: '' // 远程目录
})