html-webpack-env-plugin

2.0.0 • Public • Published

html-webpack-env-plugin

Inject env chunk to head with global function $getEnv embed process.env when using the html webpack plugin

Installation

yarn add html-webpack-env-plugin -D
const HtmlWebpackEnvPlugin = require('html-webpack-env-plugin')

Usage

{
  chainWebpack: config => {
    config.plugin('html-webpack-env').use(HtmlWebpackEnvPlugin, [
      {
        outputName: 'js/env.development.js', // deaults to 'js/env.js'
        matcher: /^(VUE_APP|CI|APP)_/
      }
    ])
  }
}

License

MIT Copyright (c) Allex Wang

Readme

Keywords

Package Sidebar

Install

npm i html-webpack-env-plugin

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

4.4 kB

Total Files

4

Last publish

Collaborators

  • allex