Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/dotenv-webpack

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/dotenv-webpack

TypeScript definitions for dotenv-webpack

  • 7.0.8
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
83K
increased by15.41%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/dotenv-webpack

Summary

This package contains type definitions for dotenv-webpack (https://github.com/mrsteele/dotenv-webpack).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dotenv-webpack.

index.d.ts

/// <reference types="node" />
import { Compiler } from "webpack";

/**
 * A secure webpack plugin that supports dotenv and other environment variables
 * and only exposes what you choose and use.
 */
declare class DotenvWebpackPlugin {
    constructor(options?: DotenvWebpackPlugin.Options);
    apply(compiler: Compiler): void;
}

declare namespace DotenvWebpackPlugin {
    interface Options {
        /**
         * The path to your environment variables.
         * @default './.env'.
         */
        path?: string | undefined;

        /**
         * If `false` ignore safe-mode, if `true` load `'./.env.example'`, if a `string` load that file as the sample.
         * @default false
         */
        safe?: boolean | string | undefined;

        /**
         * Whether to allow empty strings in safe mode.
         * If false, will throw an error if any env variables are empty (but only if safe mode is enabled).
         * @default false
         */
        allowEmptyValues?: boolean | undefined;

        /**
         * Set to `true` if you would rather load all system variables as well (useful for CI purposes).
         * @default false
         */
        systemvars?: boolean | undefined;

        /**
         * If `true`, all warnings will be surpressed.
         * @default false
         */
        silent?: boolean | undefined;

        /**
         * Allows your variables to be "expanded" for reusability within your .env file.
         * @default false
         */
        expand?: boolean | undefined;

        /**
         * Adds support for dotenv-defaults. If set to `true`, uses `./.env.defaults`. If a `string`, uses that location for a defaults file.
         * Read more at {@link https://www.npmjs.com/package/dotenv-defaults}.
         * @default false
         */
        defaults?: boolean | string | undefined;

        /**
         * Override the automatic check whether to stub `process.env`.
         * @default false
         */
        ignoreStub?: boolean | undefined;

        /**
         * The prefix to use before the name of your env variables.
         * @default 'process.env.'
         */
        prefix?: string | undefined;
    }
}

export = DotenvWebpackPlugin;

Additional Details

Credits

These definitions were written by Karol Majewski, Dave Cardwell, and Piotr Błażejewicz.

FAQs

Package last updated on 29 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc