Skip to content

Commit 26c2635

Browse files
committed
fix regex in multi-line-comment-removal plugin
1 parent 17e4cb8 commit 26c2635

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rollup/plugins/npmPlugins.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export function makeRemoveMultiLineCommentsPlugin() {
140140
return regexReplace({
141141
patterns: [
142142
{
143-
// The `s` flag makes the dot match newlines
144-
test: /^\/\*.*\*\//gs,
143+
// If we ever want to remove all comments instead of just /* ... */ ones, the regex is /\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm
144+
test: /\/\*[\s\S]*?\*\//gm,
145145
replace: '',
146146
},
147147
],

0 commit comments

Comments
 (0)