A webpack plugin that integrates dotenv-flow's environment-based .env* file loading strategy into the webpack build process, securely replacing process.env references with actual values at build time. Current stable version: 2.0.0. Release cadence: minor versions as needed. Key differentiators: supports NODE_ENV-specific files (.env.development, .env.test, .env.production) and .env*.local overrides, follows CreateReactApp conventions, and only exposes variables explicitly used in code for security. Compared to dotenv-webpack, it adds environment cascading and pattern customization.
npm install dotenv-flow-webpackVerified import paths — ran on the pinned version, not inferred.
Shows minimal webpack.config.js using DotenvFlow with custom path, environment defaults, pattern, debug, and silent options.
Set options.pattern explicitly to your expected pattern, e.g., '.env[.node_env][.local]' or upgrade file naming to match default.
Remove 'prefix' and 'safe' options. Use dotenv-flow-native 'pattern' and 'silent' options instead.
Rebuild your application after changing .env files. Or use system environment variables in production.
Ensure all used environment variables are defined in your .env* files or set in the OS environment.
Upgrade to webpack 5. If you must use webpack 4, stay on v1.x.
Run 'npm install dotenv-flow-webpack --save-dev' (or yarn add).
Use 'const DotenvFlow = require('dotenv-flow-webpack');' instead of 'import DotenvFlow from ...'.Check options: only 'node_env', 'default_node_env', 'path', 'pattern', 'debug', 'silent' are allowed.
Install the package: 'npm install dotenv-flow-webpack --save-dev'. Ensure node_modules is in require path.
No dependency data recorded yet.