{"id":49704984,"url":"https://github.com/cbtpro/fake-wechat","last_synced_at":"2026-05-08T09:49:37.295Z","repository":{"id":174283126,"uuid":"652005557","full_name":"cbtpro/fake-wechat","owner":"cbtpro","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-02T04:59:55.000Z","size":1473,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-02T05:34:18.752Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cbtpro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T19:21:01.000Z","updated_at":"2025-07-02T04:59:59.000Z","dependencies_parsed_at":"2024-09-07T18:29:40.586Z","dependency_job_id":"ef8f2555-5bee-4c77-9039-1e1ed1ad5b5b","html_url":"https://github.com/cbtpro/fake-wechat","commit_stats":null,"previous_names":["cbtpro/fake-wechat"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/cbtpro/fake-wechat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbtpro%2Ffake-wechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbtpro%2Ffake-wechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbtpro%2Ffake-wechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbtpro%2Ffake-wechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbtpro","download_url":"https://codeload.github.com/cbtpro/fake-wechat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbtpro%2Ffake-wechat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32775706,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-05-08T09:49:36.394Z","updated_at":"2026-05-08T09:49:37.290Z","avatar_url":"https://github.com/cbtpro.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fake-wechat\n\nThis template should help get you started developing with Vue 3 in Vite.\n\n## Recommended IDE Setup\n\n[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).\n\n## Type Support for `.vue` Imports in TS\n\nTypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.\n\nIf the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:\n\n1. Disable the built-in TypeScript Extension\n    1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette\n    2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`\n2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.\n\n## Customize configuration\n\nSee [Vite Configuration Reference](https://vitejs.dev/config/).\n\n## Project Setup\n\n```sh\nnpm install\n```\n\n### Compile and Hot-Reload for Development\n\n```sh\nnpm run dev\n```\n\n### Type-Check, Compile and Minify for Production\n\n```sh\nnpm run build\n```\n\n### Run Unit Tests with [Vitest](https://vitest.dev/)\n\n```sh\nnpm run test:unit\n```\n\n### Run End-to-End Tests with [Cypress](https://www.cypress.io/)\n\n```sh\nnpm run test:e2e:dev\n```\n\nThis runs the end-to-end tests against the Vite development server.\nIt is much faster than the production build.\n\nBut it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):\n\n```sh\nnpm run build\nnpm run test:e2e\n```\n\n### Lint with [ESLint](https://eslint.org/)\n\n```sh\nnpm run lint\n```\n\n### 打包时排除依赖，使用cdn替代\n\n参考文档\n\n- https://cn.vuejs.org/guide/quick-start.html#using-vue-from-cdn\n- https://cn.vitejs.dev/config/build-options.html#build-rollupoptions\n- https://cn.rollupjs.org/configuration-options/\n\n我这里选择[cdnjs](https://cdnjs.com/libraries/)来搜索对应的依赖和版本，选择包含esm、browser、prod、min关键字的链接，配置到vite.config.ts中，别人的cdn可能不靠谱，如果公司有自己的cdn，则可以将链接下载到本地，然后上传到公司的cdn上，将地址替换成公司的cdn即可。\n\n```sh\nimport { fileURLToPath, URL } from 'node:url'\n\nimport { defineConfig } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport vueJsx from '@vitejs/plugin-vue-jsx'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  base: './',\n  plugins: [vue(), vueJsx()],\n  resolve: {\n    alias: {\n      '@': fileURLToPath(new URL('./src', import.meta.url))\n    }\n  },\n  build: {\n    minify: 'terser',\n    rollupOptions: {\n      external: ['vue'],\n      output: {\n        globals: {\n          'vue': 'vue',\n          // 'vue-router': 'vue-router',\n        },\n        paths: {\n          // 'vue': 'https://cdn.jsdelivr.net/npm/vue@3.3.4/+esm',\n          'vue': 'https://cdnjs.cloudflare.com/ajax/libs/vue/3.3.4/vue.esm-browser.prod.min.js',\n          // 'vue-router': 'https://cdn.jsdelivr.net/npm/vue-router@4.2.2/+esm',\n        }\n      },\n    },\n    terserOptions: {\n      //打包后移除console和注释\n      compress: {\n        drop_console: true,\n        drop_debugger: true\n      }\n    }\n  }\n})\n\n```\n\n#### 效果\n\n通过这样的操作，光vue这一个运行时依赖，打包后就减少了50.49kB，响应的如果后续有element-ui、axios等依赖，都可以通过这样的方式减少打包大小。\n如果公司有多个vue项目，使用了这个相同链接，就能达到加速的目的，也提高的安全性，非常的棒。\n\n\n## docker相关\n\n### 创建docker容器镜像\n\n```sh\ndocker build --pull --rm -f \"dockerfile\" -t fake-wechat-client:0.0.1 \".\"\n```\n\n### 启动容器\n\n```sh\ndocker run -d --name fake-wechat-client -p 82:80 fake-wechat-client:0.0.1\n```\n\n### 停止容器\n\n```sh\n# 列出正在运行的容器\ndocker ps\n# 使用container id停止容器 推荐方式 docker stop 容器id\ndocker stop 021507f525b3\n# 使用名称停止容器\ndocker stop fake-wechat-client\n```\n### 删除容器\n\n```sh\n# 生产和测试不建议直接删除，应该生成新版本的容器\ndocker rm fake-wechat-client\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbtpro%2Ffake-wechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbtpro%2Ffake-wechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbtpro%2Ffake-wechat/lists"}