ElementUI / babel-plugin-component

Modular element-ui build plugin for babel.
452 stars 96 forks source link

为什么我在.babelrc中配置了,但是路径还是不正确呢? #3

Closed luoyjx closed 8 years ago

luoyjx commented 8 years ago

.babelrc是这样的

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

但是styleLibraryName并没有生效,可能是什么原因呢?

luoyjx commented 8 years ago

额,可能我看错了,这个option是生效了,但是依然报错

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue
Module not found: Error: Cannot resolve module 'element-ui/lib/theme-default/sub-menu-item.css' in D:\code\node\pass-voice-vue\src\components
 @ ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue 7:19-76

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue
Module not found: Error: Cannot resolve module 'element-ui/lib/sub-menu-item' in D:\code\node\pass-voice-vue\src\components
 @ ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue 11:20-59

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue
Module not found: Error: Cannot resolve module 'element-ui/lib/theme-default/sub-menu.css' in D:\code\node\pass-voice-vue\src\components
 @ ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue 15:15-67

ERROR in ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue
Module not found: Error: Cannot resolve module 'element-ui/lib/sub-menu' in D:\code\node\pass-voice-vue\src\components
 @ ./~/babel-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./src/components/SideBar.vue 19:16-50
luoyjx commented 8 years ago

sorry,我的组件名字写错了