mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
30 lines
767 B
TypeScript
30 lines
767 B
TypeScript
import * as webpack from 'webpack';
|
|
import DotenvWebpackPlugin = require('dotenv-webpack');
|
|
|
|
new DotenvWebpackPlugin(); // $ExpectType DotenvWebpackPlugin
|
|
|
|
const optionsEmpty: DotenvWebpackPlugin.Options = {};
|
|
|
|
const optionsFull: DotenvWebpackPlugin.Options = {
|
|
path: './some.other.env',
|
|
safe: true,
|
|
systemvars: true,
|
|
silent: true,
|
|
expand: true,
|
|
defaults: true
|
|
};
|
|
|
|
const optionsStrings: DotenvWebpackPlugin.Options = {
|
|
safe: './some.other.env.example',
|
|
defaults: './some.other.env.defaults'
|
|
};
|
|
|
|
const config: webpack.Configuration = {
|
|
plugins: [
|
|
new DotenvWebpackPlugin(),
|
|
new DotenvWebpackPlugin(optionsEmpty),
|
|
new DotenvWebpackPlugin(optionsFull),
|
|
new DotenvWebpackPlugin(optionsStrings)
|
|
]
|
|
};
|