html-webpack-split-assets-plugin
Webpack plugin for splitting head and body assets which are added to index.html by html-webpack-plugin
It generates two files. By default the names are headAssets.jsp and bodyAssets.jsp. These names are configurable.
Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Prerequisites
html-webpack-plugin, This plugin is an extension to html-webpack-plugin
Installing
npm install html-webpack-split-assets-plugin
Usage
Sample webpack config. Snippet from Create React App
const HTMLWebpackSplitAssetsPlugin = ; ...plugins: // Generates an `index.html` file with the <script> injected. Object // Inlines the webpack runtime script. This script is too small to warrant // a network request. // https://github.com/facebook/create-react-app/issues/5358 isEnvProduction && shouldInlineRuntimeChunk && HtmlWebpackPlugin /runtime-.+[.]js/ HtmlWebpackPlugin
Configuring file names
HtmlWebpackPlugin headAssets: "head.php" bodyAssets: "body.php"
Sample generated files from CRA
head assets
body assets
Authors
- Rajat Talwar - Initial work
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details