Adds automatically ressource hints to your html-files
Last updated 3 years ago by jantimon .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install html-ressource-hints-plugin 
SYNC missed versions from official npm registry.

Html Resource Hints Plugin

npm version Dependency Status Build status js-semistandard-style

This is an extension plugin for the webpack plugin html-webpack-plugin.

It adds automatically resource-hints to your html files to improve your load time.


You must be running webpack on node 0.12.x or higher

Install the plugin with npm:

$ npm install --save-dev html-resource-hints-plugin

Install the plugin with yarn:

$ yarn add --dev html-resource-hints-plugin

Basic Usage

Add the plugin to your webpack config as follows:

plugins: [
  new HtmlWebpackPlugin(),
  new HtmlRessourceHintPlugin()

The above configuration will actually do the same as the following:

plugins: [
  new HtmlWebpackPlugin({
		prefetch: ['*.*'],
    preload: ['*.*']
  new HtmlRessourceHintPlugin()

Even if you generate multiple files make sure that you add the HtmlRessourceHintPlugin only once:

plugins: [
  new HtmlWebpackPlugin({
		prefetch: ['*.js', 'data.json'],
    preload: '*.*'
  new HtmlWebpackPlugin({
		preload: ['*.json'],
    preload: false,
		filename: 'demo.html'
  new HtmlRessourceHintPlugin()

Current Tags

  • 0.0.1                                ...           latest (3 years ago)

1 Versions

  • 0.0.1                                ...           3 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2016 © |