A webpack plugin that wraps EnvKey's Node.js library to inject allow-listed environment variables from EnvKey into browser apps via process.env. Version 2.5.1 is stable; the package is part of the EnvKey ecosystem (encrypted environment variable management). Unlike generic dotenv plugins, this fetches variables from EnvKey servers using an ENVKEY, with an allow-list (permitted) to avoid leaking secrets. Requires webpack as a peer dependency. Release cadence is irregular, tied to EnvKey platform updates.
npm install envkey-webpack-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic configuration of envkey-webpack-plugin with required permitted list and optional dotEnvFile and define options.
Explicitly list every variable you want available in the browser in the 'permitted' array. Do not rely on default behavior to include anything.
Upgrade to v2+ or pass ENVKEY via environment variable directly before webpack build.
Rebuild the application to pick up updated environment variable values. This is expected behavior for compile-time injection.
If you want EnvKey values to take precedence, do not include them in 'define'. Check for naming conflicts.
Ensure your .env file has ENVKEY=... or set the ENVKEY environment variable in your CI/build system.
Run `npm install envkey-webpack-plugin --save-dev` in your project root.
Use `const EnvkeyWebpackPlugin = require('envkey-webpack-plugin');` (CommonJS) instead of `import`.Add ENVKEY=your_key to the .env file (or set it as an environment variable). Ensure the key is valid and not expired.