Skip to content

Commit 5c2b72c

Browse files
committed
fix: fix build babel
1 parent a81dd15 commit 5c2b72c

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
"modules": false
1414
}
1515
]
16-
],
17-
"plugins": [
18-
"external-helpers"
1916
]
2017
}
2118
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"test": "jest",
88
"lint": "echo start lint && ./node_modules/.bin/eslint src/* test/*",
9-
"build": "rollup -c"
9+
"build": "BABEL_ENV=build rollup -c"
1010
},
1111
"pre-commit": [
1212
"lint"

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ class Dayjs {
173173
daysInMonth() {
174174
return new Dayjs(new Date(this.year(), this.month() + 1, 0)).date()
175175
}
176-
}
177176

178-
export default (config) => {
179-
const d = new Dayjs(config)
180-
d.clone = () => new Dayjs(d)
181-
return d
177+
clone() {
178+
return new Dayjs(this)
179+
}
182180
}
181+
182+
export default config => (new Dayjs(config))

0 commit comments

Comments
 (0)