@alesmenzel/preload-webpack-plugin
v3.0.0
Published
A webpack plugin for injecting <link rel='preload|prefecth'> into HtmlWebpackPlugin
Downloads
96
Maintainers
Readme
@alesmenzel/preload-webpack-plugin
Pre-requisites
This module requires Webpack >= 5.0.0 and html-webpack-plugin >= 5.0.0.
Installation
npm install --save-dev @alesmenzel/preload-webpack-plugin
Usage
const PreloadWebpackPlugin = require('@alesmenzel/preload-webpack-plugin');
// ...
plugins: [
new HtmlWebpackPlugin({ /* ... */ }),
new PreloadWebpackPlugin({
include: 'initial',
rel: 'preload',
})
]
}