npm install ftp-output-webpack-plugin --save-dev
the output path is relative to the root path on which your ftp server serves
the plugin is based on node-ftp and receives the same ftp options. please see connect
method in Methods section in its READEME file
then you can do like this in webpack.config.js
const FtpOutputPlugin = require('ftp-output-webpack-plugin')
module.exports = {
output: {
path: '/', // output path on ftp server
publicPath: '/' // based on your development envrionment
},
plugins: [
new FtpOutputPlugin(ftpOptions) // ftpOptions see as above description
]
}