Skip to content

Commit 4c4b1f1

Browse files
authoredSep 28, 2019
fix: regexp for some comments (#168)
1 parent 8c68450 commit 4c4b1f1

File tree

5 files changed

+83
-84
lines changed

5 files changed

+83
-84
lines changed
 

‎package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"schema-utils": "^2.4.1",
4444
"serialize-javascript": "^2.1.0",
4545
"source-map": "^0.6.1",
46-
"terser": "^4.3.3",
46+
"terser": "^4.3.4",
4747
"webpack-sources": "^1.4.3"
4848
},
4949
"devDependencies": {
@@ -62,7 +62,7 @@
6262
"eslint": "^6.3.0",
6363
"eslint-config-prettier": "^6.3.0",
6464
"eslint-plugin-import": "^2.18.2",
65-
"husky": "^3.0.5",
65+
"husky": "^3.0.7",
6666
"jest": "^24.9.0",
6767
"jest-junit": "^8.0.0",
6868
"lint-staged": "^9.4.0",

‎src/minify.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ const buildComments = (options, terserOptions, extractedComments) => {
7777
} else {
7878
// No extract
7979
// Preserve using "commentsOpts" or "some"
80-
// Todo remove this in next major release
8180
condition.preserve =
8281
typeof commentsOpts !== 'undefined' ? commentsOpts : 'some';
8382
condition.extract = false;
@@ -106,7 +105,7 @@ const buildComments = (options, terserOptions, extractedComments) => {
106105
condition[key] = (astNode, comment) => {
107106
return (
108107
comment.type === 'comment2' &&
109-
/^\**!|@preserve|@license|@cc_on/i.test(comment.value)
108+
/@preserve|@lic|@cc_on|^\**!/i.test(comment.value)
110109
);
111110
};
112111

0 commit comments

Comments
 (0)
Failed to load comments.