GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - loongfay/webpack-upload-remote-plugin: upload files to remote server

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
receiver.php
receiver.php
 
 

Repository files navigation

webpack 文件远程部署插件

webpack文件部署插件,将文件推送到服务器。

安装

npm install --save-dev webpack-upload-remote-plugin

使用方法

在webpack.plugin中配置

const UploadRemotePlugin = require('webpack-upload-remote-plugin');
...
{
    plugins: [
        new UploadRemotePlugin({
            receiver: 'http://x.x.x.x:port/receiver',
            parallel: false,
            rules: [
                {
                    from: /(asset|static)\/.+/,
                    to: '/home/work/static'
                },
                {
                    from: /template\/.+/,
                    to: '/home/work/template'
                }
            ]
        })
    ]
}
...

参数说明

  • receiver:必填;远端接收脚本;提供php版本:./receiver.php;
  • parallel:非必填;默认为true,文件并行推送;若为false,则为串行推送,一个成功之后推送下一个;
  • rules.from:必填;构建产物静态资源路径的正则表达式;
  • rules.to:必填;服务器端接收绝对路径;

特殊说明

  • 推送过程中支持重试机制,默认重试10次;
  • 提供了 receiver.php 脚本,用于服务端接收文件;
  • 请确保服务端相应目录有接收权限;
  • 确保http各项配置满足要求,如:client_max_body_size: 8M;具体大小根据项目静态文件大小自定;

Keywords

webpack plugin remote upload http server

About

upload files to remote server

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.