npm.io
2.0.1 • Published 1 year ago

js.conf.d-webpack

Licence
BSD-3-Clause
Version
2.0.1
Deps
2
Size
6 kB
Vulns
0
Weekly
0

js.conf.d-webpack

A webpack plugin for configuration management, based on js.conf.d.

Usage

To use js.conf.d-webpack, you need to add it to your webpack config:

const JsconfdPlugin = require('js.conf.d-webpack')

const config = {
  // ...
  plugins: [
    // ...
    new JsconfdPlugin({
      folders: ['/etc/my-config', '~/.my-config', './config']
    })
  ]
}

Once added, to access the config from your application just do:

import config from '#js.conf.d'

The plugin will replace that special path with the aggregated config.

Keywords