We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 204af14 commit 07411acCopy full SHA for 07411ac
rollup/plugins/npmPlugins.js
@@ -140,8 +140,11 @@ export function makeRemoveMultiLineCommentsPlugin() {
140
return regexReplace({
141
patterns: [
142
{
143
- // The `s` flag makes the dot match newlines
144
- test: /^\/\*.*\*\//gs,
+ // If we ever want to remove all comments instead of just /* ... */ ones, the regex is
+ // /\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*$/gm. We also might consider a plugin like
145
+ // https://github.com/aMarCruz/rollup-plugin-cleanup (though to remove only multi-line comments we'd end up with
146
+ // a regex there, too).
147
+ test: /\/\*[\s\S]*?\*\//gm,
148
replace: '',
149
},
150
],
0 commit comments