html-external-webpack-plugin

0.0.2 • Public • Published

html-external-webpack-plugin

add external js,css to html-webpack-plugin

Build Status Coverage Status npm version npm downloads npm license

Install

$ npm i html-external-webpack-plugin --save

API

const HtmlExternalWebpackPlugin = require('html-external-webpack-plugin')

// webpack.config.js
plugins: [
  new HtmlWebpackPlugin(),
  new HtmlExternalWebpackPlugin({
    HtmlWebpackPlugin,
    context: __dirname,

    css: [],
    js: [],
    jsCDN: '',
  }),
]

options

name type desc
options.HtmlWebpackPlugin the HtmlWebpackPlugin reference
options.context String the context dir for resolve dep
options.css []String extra css to add
options.js []JsType extra js to add
options.jsCDN String available unpkg / baidu / jsdelivr

JsType

supported JsType

type desc example
String fullUrl the js src https://cdn.jsdelivr.net/npm/axios@0.18.0/dist/axios.min.js
String url the js src /npm/axios@0.18.0/dist/axios.min.js
Sytring package-name the package name vue
Object {name, version, path} { name: 'lodash', version: '4.0.0',path: '/lodash.min.js'}

Changelog

CHANGELOG.md

License

the MIT License http://magicdawn.mit-license.org

Package Sidebar

Install

npm i html-external-webpack-plugin

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

15.4 kB

Total Files

18

Last publish

Collaborators

  • magicdawn