1.0.0 • Published 6 years ago

insert-script-webpack-plugin v1.0.0

Weekly downloads
47
License
MIT
Repository
github
Last release
6 years ago

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'
        })
    ]
}