mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
- version 3 is breaking (not on the shape of the api though): https://github.com/mrsteele/dotenv-webpack/releases/tag/v3.0.0 - minor JSDoc refinements - minor code corrections to align with package README Thanks!
32 lines
699 B
TypeScript
32 lines
699 B
TypeScript
import * as webpack from 'webpack';
|
|
import Dotenv = require('dotenv-webpack');
|
|
import { Options } from 'dotenv-webpack';
|
|
|
|
new Dotenv(); // $ExpectType DotenvWebpackPlugin
|
|
|
|
const optionsEmpty: Options = {};
|
|
|
|
const optionsFull: Options = {
|
|
path: './some.other.env',
|
|
safe: true,
|
|
allowEmptyValues: true,
|
|
systemvars: true,
|
|
silent: true,
|
|
expand: true,
|
|
defaults: true
|
|
};
|
|
|
|
const optionsStrings: Options = {
|
|
safe: './some.other.env.example',
|
|
defaults: './some.other.env.defaults'
|
|
};
|
|
|
|
const config: webpack.Configuration = {
|
|
plugins: [
|
|
new Dotenv(),
|
|
new Dotenv(optionsEmpty),
|
|
new Dotenv(optionsFull),
|
|
new Dotenv(optionsStrings)
|
|
]
|
|
};
|