From 397bdef910b38ccc930943ba6ff7e137c0fc76aa Mon Sep 17 00:00:00 2001 From: Jonas <30421456+jonaskuske@users.noreply.github.com> Date: Sat, 13 Feb 2021 22:37:38 +0100 Subject: [PATCH] fix(plugin-legacy): use correct string length in legacy env replacement --- packages/plugin-legacy/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 4694f16166fb15..3eb0e863bf7bb1 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -196,7 +196,7 @@ function viteLegacyPlugin(options = {}) { while ((match = re.exec(raw))) { s.overwrite( match.index, - match.index + legacyEnvVarMarker.length + 2, + match.index + legacyEnvVarMarker.length, `false` ) }