1.3.0 • Published 4 years ago

add-asset-to-html-plugin v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

add-asset-to-html-plugin

    Add a JavaScript or CSS asset to the HTML generated by html-webpack-plugin

Installation

Install the plugin with npm or yarn:

    $ npm i add-asset-to-html-plugin -D
    $ yarn add add-asset-to-html-plugin -D

Options


Options are passed to the plugin during instantiation.

    new AddAssetHtmlPlugin([
        { filepath: require.resolve('./antd.js') },
        {
            filepath: require.resolve('./test.js'),
            isModule: true,
            assetLocation: 'head'
        },
    ])

filepath


Type: string|Glob, mandatory

The absolute path of the file you want to add to the compilation, and resulting HTML file. Also support globby string.

isModule

Type: boolean, default is false

if set true, will add file data to html's script without src

assetLocation

Type: string, default is 'head' 'head', 'frontOfOtherScripts'

First of all, it will be enable with isModule is true. default being added into , if set frontOfOtherScripts, will add front of other scripts.

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago