css-mangle-webpack-plugin
Advanced tools
Comparing version 1.0.0-alpha15 to 1.0.0-alpha16
@@ -35,2 +35,5 @@ # 1.0.0-alpha3 | ||
- Added syntax parsing about standard APIs, e.g. document.getElementById() and document.getElementsByClassName() | ||
- Added syntax parsing about standard APIs, e.g. document.querySelector() and document.querySelectorAll() | ||
- Added syntax parsing about standard APIs, e.g. document.querySelector() and document.querySelectorAll() | ||
# 1.0.0-alpha16 | ||
- Fixed an issue where the `minify` option did not correctly handle CSS syntax such as , and .a .b. |
@@ -131,3 +131,3 @@ (function (factory) { | ||
transformEscapeSequence(syntaxText) { | ||
const ignoreRegexpInst = /".+?"|'.+?'|\/\*.+?\*\/|@[\w]+[\s\n]+|(?<=\w+\s*:\s*)\S.+?(?=[;}])/g; // Refer to safe-area. | ||
const ignoreRegexpInst = /".+?"|'.+?'|\/\*.+?\*\/|(?<=\w+\s*:\s*)\S.+?(?=[;}])|[^\s].+?(?=\s*[{,])/g; // Refer to safe-area. | ||
const ignoreRegexpList = syntaxText.matchAll(ignoreRegexpInst); | ||
@@ -145,3 +145,3 @@ const ignoreRanges = []; | ||
const length = inner.length; | ||
const inRange = ignoreRanges.find(r => r.start <= global.index && r.end >= global.index); | ||
const inRange = ignoreRanges.find(r => r.start < global.index && r.end > global.index); | ||
const isIgnore = inRange != null; | ||
@@ -148,0 +148,0 @@ if (!isIgnore) { |
@@ -6,3 +6,3 @@ { | ||
"author": "Dev Ttangkong", | ||
"version": "1.0.0-alpha15", | ||
"version": "1.0.0-alpha16", | ||
"license": "MIT", | ||
@@ -9,0 +9,0 @@ "main": "./dist/index.js", |
@@ -8,3 +8,3 @@ <div align="center"> | ||
<th>Version</th> | ||
<th>v1.0.0-alpha15</th> | ||
<th>v1.0.0-alpha16</th> | ||
</tr> | ||
@@ -11,0 +11,0 @@ </tbody> |
@@ -168,3 +168,3 @@ import { StringUtil } from "../utils/string"; | ||
transformEscapeSequence(syntaxText: string): string { | ||
const ignoreRegexpInst = /".+?"|'.+?'|\/\*.+?\*\/|@[\w]+[\s\n]+|(?<=\w+\s*:\s*)\S.+?(?=[;}])/g; // Refer to safe-area. | ||
const ignoreRegexpInst = /".+?"|'.+?'|\/\*.+?\*\/|(?<=\w+\s*:\s*)\S.+?(?=[;}])|[^\s].+?(?=\s*[{,])/g; // Refer to safe-area. | ||
const ignoreRegexpList = syntaxText.matchAll(ignoreRegexpInst); | ||
@@ -186,3 +186,3 @@ const ignoreRanges: {start: number, end: number}[] = []; | ||
const length = inner.length; | ||
const inRange = ignoreRanges.find(r => r.start <= global.index && r.end >= global.index); | ||
const inRange = ignoreRanges.find(r => r.start < global.index && r.end > global.index); | ||
const isIgnore = inRange != null; | ||
@@ -189,0 +189,0 @@ if (!isIgnore) { |
103686