1.0.0 • Published 4 years ago

@coco-platform/webpack-plugin-network-hints v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

network-hints

Build Status Coverage Status Greenkeeper badge Package Dependency Package DevDependency

An extension plugin for the webpack plugin html-webpack-plugin.

Inject resource-hints into html, to improve your load time.

Installation

pre-requirement:

webpack >= 4.0.0
node >= 10.0.0

Install the plugin with npm:

$ npm install --save-dev @coco-platform/webpack-plugin-network-hints

Install the plugin with yarn:

$ yarn add --dev @coco-platform/webpack-plugin-network-hints

Usage

Load the plugin:

const {
  NetworkHintsPlugin,
} = require('@coco-platform/webpack-plugin-network-hints');

and add it to your webpack config as follow:

plugins: [
  new HtmlWebpackPlugin(),
  new NetworkHintsPlugin({
    prefetch: ['**/*.*'],
    preload: ['**/*.*'],
  }),
];

Licence

MIT

1.0.0

4 years ago

0.5.0

5 years ago

0.4.0

5 years ago