config
Introduction

@nimpl/config

(Former next-impl-config)

The package adding support for configuration for each possible next.js environment (build, server, client, and edge)

Motivation

For the config, Next.js only offers environment variables - regular ones for the server, and ones with NEXT_PUBLIC prefix, which will be embedded during the build process.

And here are a few downsides:

  • It’s not convenient for large configuration objects.
  • It doesn’t cover all use cases, such as runtime config and react runtime config (when the image is built once and used in different environments).

On the other hand, @nimpl/config offers support for 4 different configuration options for your applications.

Another important advantage of @nimpl/config is that it supports functions (synchronous and asynchronous) and will successfully merge their result.

Installation

npm i @nimpl/config

Examples

Base example.

Additional

Please consider giving a star if you like it, it shows that the package is useful and helps continue work on this and other packages.

Create tasks with wishes, ideas, difficulties, etc. All of them will definitely be considered and thought over.