https://github.com/jdf2e/webpack-upload-plugin
webpack upload plugin
https://github.com/jdf2e/webpack-upload-plugin
Last synced: about 1 year ago
JSON representation
webpack upload plugin
- Host: GitHub
- URL: https://github.com/jdf2e/webpack-upload-plugin
- Owner: jdf2e
- Created: 2017-08-03T10:01:29.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-22T08:30:41.000Z (over 8 years ago)
- Last Synced: 2025-03-21T18:02:08.795Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jdf2e-webpack-upload-plugin
## Install
```javascript
npm install jdf2e-webpack-upload-plugin
```
## Usage
```javascript
var webpack = require('webpack')
var path = require('path')
var webpackUploadPlugin = require('jdf2e-webpack-upload-plugin')
module.exports = {
entry: {
main: './index.js',
vendor: 'moment'
},
output: {
filename: '[name].[chunkhash].js',
path: path.resolve(__dirname, 'dist')
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: ['vendor', 'manifest']
}),
new webpackUploadPlugin({
host: '192.168.1.1',
target: 'webpackTest'
})
]
}
```
## Options
* `host`: 要上传的目标服务器ip地址,默认为`73`
* `source`: 要上传的本地文件夹,例如`source: dist`
* `serverDir`: 上传到目标服务器的文件夹名称,例如:`misc.360buy.com`、`static.360buy.com`、`page.jd.com`,默认为第一个
* `port`: 服务器端口号,默认为`3000`
* `target`: 上传到服务器之后的目录名称。不要以`/`开头,否则会被认为是服务器的根目录。