Git Product home page Git Product logo

Comments (15)

airyland avatar airyland commented on August 28, 2024

Hi, 这个主要是import语法是babel编译的,没法实现只打包使用的,相当于整个库都打包了。昨天我已经实现了单个引用,稍后会完善文档。

from vux.

nyrf avatar nyrf commented on August 28, 2024

谢谢,感觉单引用还是用必要的,做移动用vue主要是小巧。

from vux.

Jeesoong avatar Jeesoong commented on August 28, 2024

@nyrf @airyland 我之前用也是这样的,看太大了就把组件单拿出来了,没按照官方的引入,项目用的是手淘的适配方案,样式也自己覆盖了一下

from vux.

airyland avatar airyland commented on August 28, 2024

@Jeesoong 直接作为submodule引用vue文件也是可以的 就是协作更新麻烦点 不过现在也终于能支持单组件import了

from vux.

nyrf avatar nyrf commented on August 28, 2024

@airyland 谢谢,不过用最新的测试了下,报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./vux/vux.css,代码用的README里的例子

from vux.

nyrf avatar nyrf commented on August 28, 2024

@Jeesoong 手淘的适配方案地址是?谢谢

from vux.

airyland avatar airyland commented on August 28, 2024

@nyrf 目测这可能是webpack loader的问题,需要检查一下,暂时可以用相对路径解决

@import '../node_modules/vux/vux.css';

from vux.

nyrf avatar nyrf commented on August 28, 2024

@airyland 我用的是vue-cli 创建的,没修改过什么,我再试试,谢谢

from vux.

airyland avatar airyland commented on August 28, 2024

@nyrf

正确引入vux.css的方式是这样:

@import '~vux/vux.css';

from vux.

Rockergmail avatar Rockergmail commented on August 28, 2024

src/components中很多组件都是用es6写的,这样也会对babel打包,有什么方法可以针对vue文件的script转换为es5吗?

from vux.

airyland avatar airyland commented on August 28, 2024

@Rockergmail ”对babel打包“是什么鬼?使用webpack所有script都会变成es2015吧。

from vux.

Rockergmail avatar Rockergmail commented on August 28, 2024

@airyland 谢谢你的解答,因为我的项目打包之后,里面很多babel的东西,所以想找方案去掉babel,所以我是想用构建工具(gulp)将es6变成es5之后再打包。你知道有对vue文件里面的es6转换成es5的方法吗?

from vux.

airyland avatar airyland commented on August 28, 2024

@Rockergmail 为了使用新语法加入babel的polyfill也是正常的。目前应该不可能不用pollyfill实现兼容。所以你不用babel也一定是其他的polyfill,需要自行探索,但是不推荐。

from vux.

Rockergmail avatar Rockergmail commented on August 28, 2024

@airyland 如何自定义生成vux.css?我的项目里面有很多都用不上

from vux.

airyland avatar airyland commented on August 28, 2024

@Rockergmail 见v0.1.2 release

from vux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.