Skip to content

Commit 31839b8

Browse files
committed
optimize build
1 parent 88a7203 commit 31839b8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "presets": ["@babel/preset-env"] }
1+
{ "presets": [["@babel/preset-env", { "loose": true }]] }

src/transforms/util.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ import {
77
NONE,
88
} from '../tokenTypes'
99

10-
// This is the only (current) file where it would make sense to spread an array
11-
// as function call arguments. We use .apply instead to reduce filesize
12-
/* eslint-disable prefer-spread */
13-
1410
export const directionFactory = ({
1511
types = [LENGTH, UNSUPPORTED_LENGTH_UNIT, PERCENT],
1612
directions = ['Top', 'Right', 'Bottom', 'Left'],
@@ -20,11 +16,11 @@ export const directionFactory = ({
2016
const values = []
2117

2218
// borderWidth doesn't currently allow a percent value, but may do in the future
23-
values.push(tokenStream.expect.apply(tokenStream, types))
19+
values.push(tokenStream.expect(...types))
2420

2521
while (values.length < 4 && tokenStream.hasTokens()) {
2622
tokenStream.expect(SPACE)
27-
values.push(tokenStream.expect.apply(tokenStream, types))
23+
values.push(tokenStream.expect(...types))
2824
}
2925

3026
tokenStream.expectEmpty()

0 commit comments

Comments
 (0)