Skip to content

daxianyu/html-resource-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin for html-webpack-plugin to extract resources from html page

install

npm install html-resource-webpack-plugin --save-dev

const HtmlWebpackPlugin = require('html-webpack-plugin')
const HtmlResourcePlugin = require('../index')

let webpackConfig = {
    // .....
    plugins: [
        new HtmlWebpackPlugin({
            filename: 'index2.html',
            template: path.resolve(pwd, "./test/te2/index2.html"),
            resourceName: {
                js: 'statics/[name]_[hash:6].[ext]',
                css: 'statics/[name]_[hash:6].[ext]'
            },
            chunks: ['index2']
        }),
        new HtmlResourcePlugin()
    ]
}

About

plugin for html-webpack-plugin to extract resources from html page

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published