dotenv-webpack 8.0.1 → 8.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Interested in taking your environments to the next level? Check out the [Dotenv
|
|
|
42
42
|
|
|
43
43
|
The plugin can be installed with little-to-no configuration needed. Once installed, you can access the variables within your code using `process.env` as you would with `dotenv`.
|
|
44
44
|
|
|
45
|
-
The example
|
|
45
|
+
The example below shows a standard use-case.
|
|
46
46
|
|
|
47
47
|
### Create a .env file
|
|
48
48
|
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,6 @@ var _dotenvDefaults = _interopRequireDefault(require("dotenv-defaults"));
|
|
|
9
9
|
|
|
10
10
|
var _fs = _interopRequireDefault(require("fs"));
|
|
11
11
|
|
|
12
|
-
var _webpack = require("webpack");
|
|
13
|
-
|
|
14
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
13
|
|
|
16
14
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -70,7 +68,10 @@ var Dotenv = /*#__PURE__*/function () {
|
|
|
70
68
|
target: target,
|
|
71
69
|
version: version
|
|
72
70
|
});
|
|
73
|
-
|
|
71
|
+
|
|
72
|
+
var DefinePlugin = compiler.webpack && compiler.webpack.DefinePlugin || require('webpack').DefinePlugin;
|
|
73
|
+
|
|
74
|
+
new DefinePlugin(data).apply(compiler);
|
|
74
75
|
}
|
|
75
76
|
}, {
|
|
76
77
|
key: "gatherVariables",
|