Getting Started

Injex is a set of npm packages under the @injex npm scope.



Injex can be installed via NPM or YARN. The first package to install is the core package; it includes the main functionality of Injex. Most of your work will be with this package.

npm install --save @injex/core

After installing the core package, you will need to install an Injex runtime. A runtime implements the functionality of loading files and modules into the Injex container. For example, the Node runtime defines the root directories for modules, while the Webpack runtime defines the require context for modules.

If you're working on a server-side project, install the Node runtime:

npm install --save @injex/node

if your project is a client-side project with the Webpack bundler, install the Webpack runtime:

npm install --save @injex/webpack

When working on a hybrid application (server and client), you can install more than one runtime.

Read on to learn more about Injex runtimes and how to create a container on each one of them.