Comments (15)
Hi, 这个主要是import语法是babel编译的,没法实现只打包使用的,相当于整个库都打包了。昨天我已经实现了单个引用,稍后会完善文档。
from vux.
谢谢,感觉单引用还是用必要的,做移动用vue主要是小巧。
from vux.
@nyrf @airyland 我之前用也是这样的,看太大了就把组件单拿出来了,没按照官方的引入,项目用的是手淘的适配方案,样式也自己覆盖了一下
from vux.
@Jeesoong 直接作为submodule引用vue文件也是可以的 就是协作更新麻烦点 不过现在也终于能支持单组件import了
from vux.
@airyland 谢谢,不过用最新的测试了下,报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./vux/vux.css
,代码用的README里的例子
from vux.
@Jeesoong 手淘的适配方案地址是?谢谢
from vux.
@nyrf 目测这可能是webpack loader的问题,需要检查一下,暂时可以用相对路径解决
@import '../node_modules/vux/vux.css';
from vux.
@airyland 我用的是vue-cli 创建的,没修改过什么,我再试试,谢谢
from vux.
正确引入vux.css的方式是这样:
@import '~vux/vux.css';
from vux.
src/components中很多组件都是用es6写的,这样也会对babel打包,有什么方法可以针对vue文件的script转换为es5吗?
from vux.
@Rockergmail ”对babel打包“是什么鬼?使用webpack所有script都会变成es2015吧。
from vux.
@airyland 谢谢你的解答,因为我的项目打包之后,里面很多babel的东西,所以想找方案去掉babel,所以我是想用构建工具(gulp)将es6变成es5之后再打包。你知道有对vue文件里面的es6转换成es5的方法吗?
from vux.
@Rockergmail 为了使用新语法加入babel的polyfill也是正常的。目前应该不可能不用pollyfill实现兼容。所以你不用babel也一定是其他的polyfill,需要自行探索,但是不推荐。
from vux.
@airyland 如何自定义生成vux.css?我的项目里面有很多都用不上
from vux.
@Rockergmail 见v0.1.2 release
from vux.
Related Issues (20)
- ios 15.4.1 上 x-dialog 组件水平不居中,靠屏幕左边
- 多个tab-item,为什么使用demo里tab代码,点击tab-item无法自动向左滚动
- 监听input修改v-model无效
- 备用文档地址
- 版本2.2.0 ,x-input点击清空icon按钮没效果哎,这个有办法解决吗 ,需要更改源码吗? HOT 2
- after npm run build, node_modules/vux/src/components Cannot read property 'vux.alert.button_text' of undefined HOT 2
- CellFormPreview 组件IOS16下有问题 HOT 6
- demo网页不能访问了https://vux.li/demos/v2/?x-page=v2-doc-home HOT 2
- I have issues building the project in Nuxt
- 模板vue-cli-3-example 本地重新yarn后报错 HOT 1
- 支持一下SSR
- yarn run build 报错 HOT 1
- Vux官网不显示样式预览 HOT 3
- Previewer 预览再删除图片控制台报错 HOT 3
- 在nuxt中使用Scroller 会报错 HOT 1
- 现在npm 包不是最新代码吗?
- Datetime时间组件 order-map时间排列顺序 属性 不能显示上午下午 noon: 6 无效 HOT 1
- 项目支持 Vue 3 吗? HOT 4
- X-number相关
- x-number 的@on-change方法不触发
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vux.