We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 97a864d + 1140d82 commit c6ebc71Copy full SHA for c6ebc71
src/index.js
@@ -1,6 +1,5 @@
1
import dotenv from 'dotenv-defaults'
2
import fs from 'fs'
3
-import { DefinePlugin } from 'webpack'
4
5
// Mostly taken from here: https://github.com/motdotla/dotenv-expand/blob/master/lib/main.js#L4
6
const interpolate = (env, vars) => {
@@ -46,6 +45,7 @@ class Dotenv {
46
45
target,
47
version
48
})
+ const DefinePlugin = (compiler.webpack && compiler.webpack.DefinePlugin) || require('webpack').DefinePlugin
49
50
new DefinePlugin(data).apply(compiler)
51
}
0 commit comments