buildedassets-upload-webpack-plugin

1.0.3 • Public • Published

buildedassets-upload-webpack-plugin

Upload the webpack packaged file to cdn or some other place

webpack3/4 | node.js v8 above

Install

npm i -D buildedassets-upload-webpack-plugin

Usage

plugins: [
    new UploadPlugin({
      filterExts: ['.js'],
      delayTime: 1000,
      fileUpload: {
        upload(paths, callback) {
          /* callback(paths) */
        },
        callback(args) {
          /* console.log(args)*/
        }
      }
    })
  ]

!important If you do not pass the fileUpload object, default use netease nos sdk to upload the file to nos. You need to refer to the following document configuration

new UploadPlugin({
     filterExts: ['.js'],
     root: './dist',
     delayTime: 1000,
     accessId: 'id',
     secretKey: '',
     endpoint: '',
     port: 80,
     bucket: 'bucket'
})

Description

fileUpload is an object, which contains two methods, one is the upload method of the upload file, the other is the callback method, the first parameter of the upload is the file path packaged by webpack, and the second parameter is the callback method, the parameter is fileUpload callback method

Readme

Keywords

Package Sidebar

Install

npm i buildedassets-upload-webpack-plugin

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

103 kB

Total Files

15

Last publish

Collaborators

  • milkyway