Skip to content

Commit 53851e9

Browse files
author
mmdctjj
committed
修改新版本
1 parent 8a40ffd commit 53851e9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const RollupPluginRemoveOthersConsole = () => {
3232

3333
return rows.map((row, idx) => {
3434
if (removeLine.includes(idx)) {
35-
return row.replace(/console\.log\((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*\)[;\n]?/g, {})
35+
return row.replace(/console\.log\((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*\)[;\n]?/g, `{}`)
3636
}
3737
return row
3838
}).join('\n')

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rollup-plugin-remove-others-console",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"homepage": "https://github.com/mmdctjj/rollup-plugin-remove-others-console",
55
"description": "Automatically remove console statements from other developers and only retain their own",
66
"main": "dist/index.js",

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const RollupPluginRemoveOthersConsole = () => {
3232

3333
return rows.map((row, idx) => {
3434
if (removeLine.includes(idx)) {
35-
return row.replace(/console\.log\((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*\)[;\n]?/g, {})
35+
return row.replace(/console\.log\((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*\)[;\n]?/g, `{}`)
3636
}
3737
return row
3838
}).join('\n')

0 commit comments

Comments
 (0)