2017-04-12 69 views
1

元素UI以下是完整的代碼:https://github.com/kenpeter/osmosis_drive_front如何導入與vuejs

我想要做的是使用element UI爲我的項目。我遵循這個quick guide。它有一個babelrc設置。我很難將my babelrc與下面的這個合併。任何人都知道如何合併這兩個babelrc並使Element UI與Vuejs一起工作?

我babelrc:

{ 
    "presets": [ 
    "es2015", 
    "stage-2" 
    ], 
    "plugins": [ 
    "transform-runtime" 
    ], 
    "comments": false 
} 

元素UI babelrc

{ 
    "presets": [ 
    ["es2015", { "modules": false }] 
    ], 
    "plugins": [["component", [ 
    { 
     "libraryName": "element-ui", 
     "styleLibraryName": "theme-default" 
    } 
    ]]] 
} 

回答

1

這應該這樣做:

{ 
    "presets": [ 
    ["es2015", { "modules": false }], 
    "stage-2" 
    ], 
    "plugins": [ 
    "transform-runtime", 
    ["component", [ 
     { 
     "libraryName": "element-ui", 
     "styleLibraryName": "theme-default" 
     } 
    ]] 
    ], 
    "comments": false 
}