File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3- ## 0.10.3 -2017-07-16
3+ ## 0.10.5 - 2017-08-11
4+
5+ - Enable babelrc for vue files
6+
7+ ## 0.10.3 - 2017-07-16
48
59 - Fixed component auto naming
610
Original file line number Diff line number Diff line change @@ -150,6 +150,38 @@ Packages for `<style>` tag:
150150
151151Get involved! Add your own package with a PR! :+1 :
152152
153+ ### JSX
154+
155+ To add JSX support, install the following packages:
156+
157+ ```
158+ meteor npm i -D babel-plugin-syntax-jsx babel-plugin-transform-vue-jsx
159+ ```
160+
161+ Then add a ` .babelrc ` file in the root directory of the meteor project with the following content:
162+
163+ ``` json
164+ {
165+ "plugins" : [
166+ " transform-vue-jsx"
167+ ]
168+ }
169+ ```
170+
171+ You can now use JSX in your Vue components:
172+
173+ ``` html
174+ <script >
175+ export default {
176+ render (h ) {
177+ return < div class = " home" >
178+ < h1> #404 < / h1>
179+ < / div>
180+ }
181+ }
182+ </script >
183+ ```
184+
153185### Manual import
154186
155187You can then import your .vue component files in your meteor code:
Original file line number Diff line number Diff line change 11Package . describe ( {
22 name : 'akryum:vue-component' ,
3- version : '0.10.4 ' ,
3+ version : '0.10.5 ' ,
44 summary : 'VueJS single-file components that hot-reloads' ,
55 git : 'https://github.com/Akryum/meteor-vue-component' ,
66 documentation : 'README.md'
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ VueComponentTagHandler = class VueComponentTagHandler {
165165 // Babel
166166 if ( useBabel ) {
167167 // Babel options
168+ this . babelOptions . babelrc = true
168169 this . babelOptions . sourceMap = true ;
169170 this . babelOptions . filename =
170171 this . babelOptions . sourceFileName = tag . basePath ;
You can’t perform that action at this time.
0 commit comments