diff --git a/src/index.js b/src/index.js index 0242a62..7a68e27 100644 --- a/src/index.js +++ b/src/index.js @@ -45,8 +45,9 @@ class Dotenv { target, version }) + const DefinePlugin = (compiler.webpack && compiler.webpack.DefinePlugin) || require('webpack').DefinePlugin - new compiler.webpack.DefinePlugin(data).apply(compiler) + new DefinePlugin(data).apply(compiler) } gatherVariables () {