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

autocdn-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autocdn-webpack-plugin

```js const HtmlWebpackPlugin = require('html-webpack-plugin') const HtmlWebpackTemplate = require('html-webpack-template') const AutoCDNWebpackPlugin = require('@rabbitcc/autocdn-webpack-plugin')

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source
Logo

Usage

const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlWebpackTemplate = require('html-webpack-template')
const AutoCDNWebpackPlugin = require('@rabbitcc/autocdn-webpack-plugin')

module.exports = {
  //...webpack options...
  plugins: [
    new AutoCDNWebpackPlugin(),
    new HtmlWebpackPlugin({
      template: HtmlWebpackTemplate,
      inject: false
    })
  ]
}

Interface

type PackageName = string
type GlobalExportName = string

type CDN =
  | { url: string | Array<string>, name: GlobalExportName }
  | {
      css: string | Array<string>,
      js: string | Array<string>,
      name: GlobalExportName
    }

type Options = {
  cdn: {                             // preset cdn by yourself
    [name: PackageName]: CDN
  },
  exclude: string | Array<string>,   // exclude some package
  include: string | Array<string>,   // include some package
  report: boolean                    // report result on before inject plugin
}

FAQs

Package last updated on 10 Feb 2018

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