Skip to content

Commit 1f010e3

Browse files
authored
Merge pull request #191 from leezng/fix-optional-chaining
fix: handle optional-chaining & nullish-coalescing-operator on babel.
2 parents 7a431c5 + 6000566 commit 1f010e3

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.babelrc

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
"presets": [
3-
["@babel/preset-env", {
4-
"modules": false,
5-
"targets": {
6-
"browsers": ["> 1%", "last 10 versions", "not ie <= 11"]
3+
[
4+
"@babel/preset-env",
5+
{
6+
"modules": false,
7+
"targets": {
8+
"browsers": ["> 1%", "last 10 versions", "not ie <= 11"]
9+
},
10+
"include": [
11+
"@babel/plugin-proposal-optional-chaining",
12+
"@babel/plugin-proposal-nullish-coalescing-operator"
13+
]
714
}
8-
}],
9-
'@vue/babel-preset-jsx'
15+
],
16+
"@vue/babel-preset-jsx"
1017
],
1118
"plugins": ["@babel/plugin-transform-runtime"],
1219
"env": {

build/webpack.base.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = {
5757
},
5858
},
5959
{
60-
test: /\.js[x]$/,
60+
test: /\.(jsx?)$/,
6161
loader: 'babel-loader',
6262
include: [resolve('src'), resolve('example'), resolve('test')],
6363
},

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-json-pretty",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"description": "A JSON tree view component that is easy to use and also supports data selection.",
55
"author": "leezng <[email protected]>",
66
"main": "lib/vue-json-pretty.js",

0 commit comments

Comments
 (0)