@jumpgroup/stencil-env
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@jumpgroup/stencil-env

This package is a fork of @alepop/stencil-env. It loads envs from process.env during build time, useful while working with Vercel. Swaps dotenv for dotenv-flow.

Here's the original package README.

@alepop/stencil-env

This package is used to use env variables from .env file in your stencil project files.

First, npm install within the project:

npm install @alepop/stencil-env --save-dev

Next, within the project's stencil.config.js file, import the plugin and add it to the plugins config.

stencil.config.ts

import { Config } from '@stencil/core';
import { env } from '@alepop/stencil-env';

export const config: Config = {
  plugins: [
      env()
  ]
};

You can additionally, pass options to the env plugin.

Add .env file in the root of your project

.env

TEST=test string

After compilation, process.env.TEST will be replaced by it variable from .env file.

Related

Readme

Keywords

Package Sidebar

Install

npm i @jumpgroup/stencil-env

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

4.78 kB

Total Files

5

Last publish

Collaborators

  • lovejade
  • cristiano-f
  • sinsimon19
  • mellinmeg
  • jericam
  • sinsimon
  • fabio.p