From 25bde2958d6120cfab8eaf4dd79041c2aa67554a Mon Sep 17 00:00:00 2001 From: ChromeQ Date: Tue, 16 Mar 2021 13:28:35 +1100 Subject: [PATCH] fix: resolving version issue when missing in v4 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index f0cbac5..bc46171 100644 --- a/src/index.js +++ b/src/index.js @@ -38,7 +38,7 @@ class Dotenv { apply (compiler) { const variables = this.gatherVariables() const target = compiler.options.target ?? 'web' - const version = compiler.webpack.version + const version = (compiler.webpack && compiler.webpack.version) || '4' const data = this.formatData({ variables, target,