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` ) }