add-asset-to-html-plugin
resize html's fontSize in mobile
Last updated a month ago by didihaha .
ISC · Original npm · Tarball · package.json
$ cnpm install add-asset-to-html-plugin 
SYNC missed versions from official npm registry.

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 <head></head>, if set frontOfOtherScripts, will add front of other scripts.

Current Tags

  • 1.2.0                                ...           latest (a month ago)

4 Versions

  • 1.2.0                                ...           a month ago
  • 1.1.0                                ...           5 months ago
  • 1.0.1                                ...           5 months ago
  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 18
Dependencies (3)
Dev Dependencies (21)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |