NewFuture / miniprogram-build

A command line tool to build wechat MiniProgram. 微信小程序命令行构建工具
https://miniprogram-build.newfuture.cc
MIT License
58 stars 14 forks source link

是否可以支持组件库按需导入 #25

Open xxyuze opened 5 years ago

xxyuze commented 5 years ago

gulp.task('vant', function () { gulp.src('./node_modules/vant-weapp/dist/{common,mixins,cell,cell-group,button,loading,field,tabs,tab,tag,icon,popup,overlay,transition}/**/*.{wxml,wxss,js,json}') .pipe(gulp.dest('dist/libs/vant')); })

NewFuture commented 5 years ago

嗯,这个需求确实存在,

但是似乎很难自动化实现

如果 把所有 .json 的 components 和 dependences 把依赖关系提取出来, 但是这个存在风险,组件库中也有依赖