Skip to content

Commit

Permalink
Merge pull request #191 from leezng/fix-optional-chaining
Browse files Browse the repository at this point in the history
fix: handle optional-chaining & nullish-coalescing-operator on babel.
  • Loading branch information
leezng authored Aug 19, 2022
2 parents 7a431c5 + 6000566 commit 1f010e3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
19 changes: 13 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
{
"presets": [
["@babel/preset-env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 10 versions", "not ie <= 11"]
[
"@babel/preset-env",
{
"modules": false,
"targets": {
"browsers": ["> 1%", "last 10 versions", "not ie <= 11"]
},
"include": [
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator"
]
}
}],
'@vue/babel-preset-jsx'
],
"@vue/babel-preset-jsx"
],
"plugins": ["@babel/plugin-transform-runtime"],
"env": {
Expand Down
2 changes: 1 addition & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = {
},
},
{
test: /\.js[x]$/,
test: /\.(jsx?)$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('example'), resolve('test')],
},
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-json-pretty",
"version": "1.9.0",
"version": "1.9.1",
"description": "A JSON tree view component that is easy to use and also supports data selection.",
"author": "leezng <[email protected]>",
"main": "lib/vue-json-pretty.js",
Expand Down

0 comments on commit 1f010e3

Please sign in to comment.