Skip to content

Commit 7f48086

Browse files
authored
fix(plugin-legacy): use correct string length in legacy env replacement (#2015)
1 parent d7192ad commit 7f48086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/plugin-legacy/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ function viteLegacyPlugin(options = {}) {
196196
while ((match = re.exec(raw))) {
197197
s.overwrite(
198198
match.index,
199-
match.index + legacyEnvVarMarker.length + 2,
199+
match.index + legacyEnvVarMarker.length,
200200
`false`
201201
)
202202
}

0 commit comments

Comments
 (0)