New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

webpack-cdn-plugin-5

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-cdn-plugin-5

webpack plugin for uploading assets to you cdn

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

webpack-cdn-plugin-5

For webpack4, please refer to webpack4-cdn-plugin.

Docs

Install

npm i webpack-cdn-plugin-5 -D

Usage

const { Webpack5CDNPlugin } = require('webpack-cdn-plugin-5')

// webpack config
module.exports = {
  plugins: [
    // ...
    new Webpack5CDNPlugin({
      keepLocalFiles: false,
      manifestFilename: 'manifest.json',
      uploadContent({ file, content }) {
        // TODO 需要自己实现上传文件、重试、并发控制
        return uploadTaskManager.upload(content).then(result => {
          return `http://127.0.0.1:8080/${result.hash_url}`
        })
      }
    })
  ]
}

Keywords

webpack

FAQs

Package last updated on 18 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts