@akqa-frontline/generate-injection-html-webpack-plugin
v0.9.0-rc.1
Published
![GitHub](https://img.shields.io/github/license/akqa-frontline/frontline) ![npm (scoped)](https://img.shields.io/npm/v/@akqa-frontline/generate-injection-html-webpack-plugin)
Downloads
42
Readme
@akqa-frontline/generate-injection-html-webpack-plugin
this package is not yet fully documented
Generate html files with entry point assets
What does it do
This package generates HTML with marktup to load script and styles, for both modern and legacy builds
Install
Install this package and its peer dependencies:
npm install --save-dev --save-exact @akqa-frontline/generate-injection-html-webpack-plugin
npm install --save-dev --save-exact webpack
Usage
Add the plugin to your webpack configuration
// webpack.config.js
const {FrontlineGenerateInjectionHtmlWebpackPlugin} = require("@akqa-frontline/generate-injection-html-webpack-plugin")
const moduleWebpackConfiguration = {
plugins: [
new FrontlineGenerateInjectionHtmlWebpackPlugin({browserslistEnv: "modern"})
]
}
const noModuleWebpackConfiguration = {
plugins: [
new FrontlineGenerateInjectionHtmlWebpackPlugin({browserslistEnv: "legacy"})
]
}
module.exports = [moduleWebpackConfiguration, noModuleWebpackConfiguration]
Take a look at webpack-config for instructions on a more complete Frontline webpack configuration.
Contributing
Please refer to the contributing document.
License
ISC © AKQA