Commit ddc0481
authored
fix(build): Fix regex in multiline-comment-removal Rollup plugin (#5783)
The existing regex, when presented with code like this:
```js
/*
* This is
* a multiline
* comment
*/
const thisIs = "real code"
/*
* This is
* another multiline
* comment
*/
const thisIsAlso = "real code"
```
matches everything between the initial `/*` on the first line and the final `*/` on the second-to-last line, and the plugin thus removes all but the last line of the file. This fixes the regex so that only the comments are removed.1 parent 1540616 commit ddc0481
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| |||
0 commit comments