0.1.11 • Published 2 years ago
override-configs v0.1.11
override-configs
Installation
Install npm package:
npm install override-configs
Usage
const overrideConfigs = require("override-configs");
const defaultConfig = { NODE_ENV: "production" };
const overrideFilePaths = [path.join(__dirname, "config.override.js")];
// optional
const args = [{ webpack: {} }];
const options = { silent: true };
module.exports = overrideConfigs(
defaultConfig,
overrideFilePaths,
args,
options
);
Expectations:
- Config file types include:
json
,js
,cjs
. - Config must be the default export.
- Config may be an object or a function.
Configs are merged in the order of lodash.merge.
License
MIT