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

Modular element-ui build plugin for babel.

Results 44 babel-plugin-component issues
Sort by recently updated
recently updated
newest added

vue 版本 2.6 element 版本 2.15 vue-cli 版本 4.5.17 babel.config.js 配置文件 ``` { "presets": [ "@vue/cli-plugin-babel/preset" ], "plugins": [ [ "component", { "libraryName": "element-ui", "styleLibraryName": "theme-chalk" } ] ] }...

error in ./src_form/main.js Syntax Error: Error: D:\Project\jc_forms_git\src_form\main.js: [babel-plugin-component] If you are using bothon-demand and importing all, make sure to invoke the importing all first. at Array.map () @ multi (webpack)-dev-server/client?http://192.168.1.208:8080/sockjs-node...

```javascript import { Container as ElContainer } from 'element-ui' ``` 这样会报错,这样对于JSX单文件组件或者class-component 很不方便。 需要多写Vue的组件注册(其实完全可以省掉) ```javascript Vue.component(Container.name, Container); ``` 或者比如现在的形式,需要在components中alias一下。 ```javascript import { Container, Main, Button, Header } from 'element-ui' import template...

1. 修复 Error 文案缺少空格问题 ![xxxx](https://user-images.githubusercontent.com/25051945/82039962-5a482000-96d8-11ea-8f03-6301e76cee12.png)

按需引入的css样式优先级太高了,无论在`App.vue`还是`main.js`中引入用来覆盖的css样式,都不能产生效果。发现组件的``在比较靠前的位置,直接在`index.html`的``中引入样式可以处理覆盖问题,但是这样只能引入`.css`,就不能用预处理器了,有什么更好的办法吗?

如题,我近期用到了elementui,因为觉得很好用,就把我之前项目整个替换成该UI库,但是现在遇到一个问题,希望各位大大给点帮助,因为网络上实在没有找到相关问题。 我的项目里有两个入口文件,index.js和login.js,对应两个html。 因为登录页只用到少许组件,所以我就想在login页使用babel-plugin-component这个插件,但index.js里是照常引入。 import Vue from 'vue'; import ElementUI from 'element-ui'; Vue.use(ElementUI); 这个时候babel-plugin-component就会报错 ERROR in ./src/app.js Module build failed: Error: C:/Users/kuo/Desktop/vue-projects/gk/src/app.js: [babel-plugin-component] If you are using bothon-demand and importing all,...

能否使js路径基于/lib,而css/scss路径基于非lib的路径,比如packages,thx! 用于支持自定义主题的按需引入(引入变量方式) Converts ```javascript import { Button } from 'element-ui' ``` To ```javascript var button = require('element-ui/lib/button') require('element-ui/packages/theme-chalk/src/button.scss') ```

When using with babel@^7.0.0 everything works fine except of the MessageBox-Component of Vue elementUI: `Uncaught ReferenceError: _MessageBox is not defined` main.js: ```javascript /* * ELEMENT UI */ import { Alert,...

## Problem [@babel/plugin-transform-modules-commonjs](https://github.com/babel/babel/tree/main/packages/babel-plugin-transform-modules-commonjs) used by [@babel/preset-env ](https://babeljs.io/docs/en/babel-preset-env) for transform modules to commonjs will save which nodes have already traverse and skip them when the next traverse(https://github.com/babel/babel/blob/10978bb65a4b4e8874ca8dd3054b8c31b5838b7f/packages/babel-helper-module-transforms/src/rewrite-live-references.js#L175) `@babel/plugin-transform-modules-commonjs` will save every...

```javascript import { shallowMount, createLocalVue } from '@vue/test-utils'; import Vue from 'vue'; import { Button } from 'element-ui'; // 执行到这一行的时候出错 import Country from '@/components/a.vue'; const localVue = createLocalVue(); localVue.use(Button); Vue.prototype.$ELEMENT...