insert-script-webpack-plugin

1.0.0 • Public • Published

InsertScriptWebpackPlugin

在 html 中,插入 script 标签。如添加 jQuery;

const HtmlWebpackPlugin = require('html-webpack-plugin');
const InsertScriptWebpackPlugin = require('insert-script-webpack-plugin');
 
module.exports = {
    entry: './src/index.js',
    output: { /** **/ },
    module: { /** **/ },
    plugins: [
        new InsertScriptWebpackPlugin({
            paths: ['http://www.example.com/jquery.js']
        }),
        new HtmlWebpackPlugin({
            template: './src/index.html'
        })
    ]
}
 

Package Sidebar

Install

npm i insert-script-webpack-plugin

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.02 kB

Total Files

4

Last publish

Collaborators

  • tanbo