Skip to content

Commit 150edaa

Browse files
committed
Reduce size bundle for browser
1 parent c8a7ec3 commit 150edaa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/css-syntax-error.es6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ class CssSyntaxError {
168168
let maxWidth = String(end).length;
169169

170170
function mark(text) {
171-
if ( color ) {
171+
if ( color && chalk.red ) {
172172
return chalk.red.bold(text);
173173
} else {
174174
return text;
175175
}
176176
}
177177
function aside(text) {
178-
if ( color ) {
178+
if ( color && chalk.gray ) {
179179
return chalk.gray(text);
180180
} else {
181181
return text;

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@
6969
"lint-staged"
7070
],
7171
"browser": {
72+
"supports-color": false,
73+
"chalk": false,
7274
"fs": false
7375
},
7476
"size-limit": [
7577
{
7678
"path": "build/lib/postcss.js",
77-
"limit": "36 KB"
79+
"limit": "28 KB"
7880
}
7981
],
8082
"eslintConfig": {

0 commit comments

Comments
 (0)