Skip to content

Commit 4d00e52

Browse files
committed
fix: improve stripping the ESPRUINO__ROLLUP_MAIN
1 parent 3595355 commit 4d00e52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

espruino-modules-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ function espruinoModules(options) {
188188
// to ensures the onInit() is never dropped as unused
189189
contents.code = contents.code
190190
.replace(/(,?)\s*ESPRUINO__ROLLUP_MAIN\(\s*\(\)\s*=>\s*onInit\(\)\s*\)\s*([;,]?)/m,
191-
(match, comma1, comma2) => (comma1 && comma2 ? ',' : ''));
191+
(match, comma1, comma2) => (comma1 && comma2 ? comma2 : ''));
192192

193193
contents.code =
194194
plugin.stringifyCachedModules(spacer) +

0 commit comments

Comments
 (0)