babel-plugin-component icon indicating copy to clipboard operation
babel-plugin-component copied to clipboard

babel 7 什么时候支持

Open Ahuiorg opened this issue 5 years ago • 3 comments

babel 7 现在不支持这种写法了 会报错: .libraryName is not a valid Plugin property

Ahuiorg avatar Sep 27 '18 03:09 Ahuiorg

改成这样能用了,多了一层[],参考的 http://www.duanzhihe.com/?p=1813

module.exports = { presets: [ '@vue/app' ], plugins: [ ['component', { 'libraryName': 'element-ui', 'styleLibraryName': 'theme-chalk' } ] ] }

IEfucker avatar Oct 24 '18 07:10 IEfucker

并没有支持babel7,我配置了上诉配置,又会出现其他错误,可能和loader等相关套件版本有关

hd619953679 avatar Mar 06 '19 07:03 hd619953679

https://www.cnblogs.com/wuguanglin/p/10593013.html 按照这个来,安装@babel/preset-env,我成功了, babel.config.js .babelrc配置文件二选一,都可以

xiaoksks avatar Jun 26 '19 00:06 xiaoksks