@kikoda/craco-plugin-config-manifest
v0.0.1
Published
CRACO plugin to generate an opinionated config manifest file used to load runtime configuration files in react apps
Downloads
26
Readme
craco-plugin-config-manifest
Use this craco-plugin-config-manifest to architect and model modern applications
Install from NPM:
yarn add --dev @kikoda/craco-plugin-config-manifest
# or
npm install @kikoda/craco-plugin-config-manifest --save-dev
Usage## Usage
Generaged Config for webpack apps
Use this package and plugin in conjunction with @kikoda/generated-config
and @craco/craco
to inject config values depending on environment. Also see @kikoda/generated-config-hooks
for pre-built React hooks to load config values from generated config files.
CRACO
Add this to your craco.config.js
:
import { ConfigManifestPlugin } from '@kikoda/craco-plugin-config-manifest';
import { GeneratedConfig } from '@kikoda/generated-config';
const { fileName } = new GeneratedConfig({
stage: '<stage-name>',
servicePath: './app',
});
module.exports = {
plugins: [{ plugin: ConfigManifestPlugin(fileName) }],
};
Verbose Logging
Enable verbose logging by setting the DEBUG
environment variable to 'true'
Opening Issues
If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates.
When opening an issue, include the Kikoda Construct Library version, Node version, and stack trace if available. In addition, include the steps to reproduce when appropriate.
You can also open an issue for a feature request.
Contributing
If you find an issue with this package and have a fix, please feel free to open a pull request following the procedures.
Testing
If you contribute to this package you can run the tests using yarn test
.
License
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
This product includes software developed at Kikoda (https://www.kikoda.com). Copyright 2022 Kikoda, LLC.