@akqa-frontline/generate-injection-html-webpack-plugin

![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)

Usage no npm install needed!

<script type="module">
  import akqaFrontlineGenerateInjectionHtmlWebpackPlugin from 'https://cdn.skypack.dev/@akqa-frontline/generate-injection-html-webpack-plugin';
</script>

README

@akqa-frontline/generate-injection-html-webpack-plugin

GitHub npm (scoped)

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