{"id":13725003,"url":"https://github.com/ctripcorp/wean","last_synced_at":"2025-10-25T14:32:27.852Z","repository":{"id":47164831,"uuid":"347001408","full_name":"ctripcorp/wean","owner":"ctripcorp","description":":four_leaf_clover: Super fast miniapp compiler.","archived":false,"fork":false,"pushed_at":"2021-09-08T06:20:36.000Z","size":555,"stargazers_count":392,"open_issues_count":4,"forks_count":43,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-14T15:38:53.370Z","etag":null,"topics":["bundler","miniprogram","webpack-wean"],"latest_commit_sha":null,"homepage":"https://wean.deno.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctripcorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-12T08:55:22.000Z","updated_at":"2024-10-11T06:13:09.000Z","dependencies_parsed_at":"2022-09-11T01:41:19.518Z","dependency_job_id":null,"html_url":"https://github.com/ctripcorp/wean","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctripcorp%2Fwean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctripcorp%2Fwean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctripcorp%2Fwean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctripcorp%2Fwean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctripcorp","download_url":"https://codeload.github.com/ctripcorp/wean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252424899,"owners_count":21745834,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundler","miniprogram","webpack-wean"],"created_at":"2024-08-03T01:02:09.530Z","updated_at":"2025-10-25T14:32:22.807Z","avatar_url":"https://github.com/ctripcorp.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://i.loli.net/2021/03/11/69sRUvYhkGrInX2.png\" alt=\"wean logo\" width=\"180\"\u003e\n\u003c/p\u003e\n\n[![Build Status](https://github.com/ctripcorp/wean/workflows/ci/badge.svg?branch=master)](https://github.com/ctripcorp/wean/actions)\n\n---\n\n**:fire: Note this is early experimental! 实验阶段的主要工作是想办法让整体架构变稳定、简洁，不建议上生产。**\n\n---\n\nwean 是一个小程序编译器前端，它负责将标准的微信小程序打包成 fre 代码，这样做有很多好处——\n\n- **小程序引擎** - 将打包产物跑到 APP webview 上，就可以成为专属小程序，如“携程小程序”\n- **开箱即用** - 更现代的标准，更短的开发链路，从某种程度上缓解微信小程序的历史包袱\n- **跨端** - 以保住微信为前提，一套代码，支持所有小程序端\n\nwean 生成 [fre](https://github.com/yisar/fre) 代码，借助 [esbuild](https://github.com/evanw/esbuild) 做 js 的打包\n\n### QQ group\n\n\u003cimg src=\"https://i.loli.net/2021/03/24/wYdhGJuNzZXT1QW.jpg\" alt=\"wean logo\" width=\"250\"\u003e\n\n### Demo\n\n- [图虫小程序 @ 飘香豆腐](https://github.com/yisar/wean-demo-tuchong)\n\n- [TodoMVC](https://github.com/ctripcorp/wean/tree/master/demo)\n\n### Run\n\n```shell\n$ npm install\n$ npm link\n$ wean\n```\n\n### Motivation\n\n在 wean 之前，大量小程序工具使用 babel + webpack 进行打包，各种 loader 、plugin 导致整个开发链路变长，O(n^n) 一遍又一遍的 ast 遍历，复杂度指数级增长，编译耗时超级长，调试也超级困难\n\nwean 旨在解决链路问题，它自研编译器和打包器，整体复杂度维持在 O(n)，没有任何 AST 操作，同一个小程序项目，wean 大约比 taro（+webpack）快一百倍\n\n### Package\n\n| Package                    | Description      | Version                                                                    |\n| -------------------------- | :--------------- | :------------------------------------------------------------------------- |\n| [wean](packages/core)      | 微信小程序打包器 | [![npm](https://img.shields.io/npm/v/wean.svg)](https://npm.im/@wean/core) |\n| [wean/wxml](packages/wxml) | wxml 编译器      | [![npm](https://img.shields.io/npm/v/wean.svg)](https://npm.im/@wean/wxml) |\n\n### Design\n\n![wean](https://i.loli.net/2021/03/11/4fvJhZ2lbUgmsj1.png)\n\n#### License\n\nMIT @ctripcorp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctripcorp%2Fwean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctripcorp%2Fwean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctripcorp%2Fwean/lists"}