Skip to content

Commit

Permalink
feat: using babel and support JSX in vue. (close: #318) (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
HandOfGod94 authored and ulivz committed May 10, 2018
1 parent 34c7f99 commit 82cd8bd
Show file tree
Hide file tree
Showing 3 changed files with 651 additions and 13 deletions.
7 changes: 4 additions & 3 deletions lib/webpack/createBaseConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ module.exports = function createBaseConfig ({
// Don't transpile node_modules
return /node_modules/.test(filepath)
}).end()
.use('buble-loader')
.loader('buble-loader')
.use('babel-loader')
.loader('babel-loader')
.options({
objectAssign: 'Object.assign'
presets: ['env', 'stage-2'],
plugins: ['transform-vue-jsx', 'transform-runtime']
})
}

Expand Down
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@
},
"dependencies": {
"autoprefixer": "^8.2.0",
"buble": "^0.19.3",
"buble-loader": "^0.5.0",
"babel-core": "^6.26.3",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-loader": "^7.1.4",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.6.1",
"babel-preset-stage-2": "^6.24.1",
"chalk": "^2.3.2",
"chokidar": "^2.0.3",
"commander": "^2.15.1",
Expand Down
Loading

0 comments on commit 82cd8bd

Please sign in to comment.