html-webpack-externals

1.0.1 • Public • Published

html-webpack-externals

A plugin for html-webpack-plugin that insert into html in order according to webpackConfig.externals.

Look

This plugin must webpack >= 4, html-webpack-plugin >= 4.0.

Install

$ npm install html-webpack-externals --save-dev

Example

const webpackHtmlPlugin = require('html-webpack-plugin');
const webpackHtmlExternals = require('html-webpack-externals');
{
    externals: {
        'socketio': 'io'
    },
    plugins: [
        new webpackHtmlPlugin(),
        new webpackHtmlExternals({
            resolve: {
                'socketio': 'https://cdn.bootcss.com/socket.io/2.3.0/socket.io.slim.js'
            },
            dirname: 'public'
        })
    ]
}

Package Sidebar

Install

npm i html-webpack-externals

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.67 kB

Total Files

4

Last publish

Collaborators

  • raysoul