{"id":17790312,"url":"https://github.com/mowtwo/vite-plugin-utools-plugin","last_synced_at":"2026-02-13T23:34:05.927Z","repository":{"id":234113075,"uuid":"788287310","full_name":"mowtwo/vite-plugin-utools-plugin","owner":"mowtwo","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-02T00:59:37.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T00:59:34.941Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mowtwo.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-18T06:05:47.000Z","updated_at":"2025-04-02T00:59:40.000Z","dependencies_parsed_at":"2024-10-27T10:53:12.306Z","dependency_job_id":"80325dfb-81f0-42b2-8d15-0bb94aef430e","html_url":"https://github.com/mowtwo/vite-plugin-utools-plugin","commit_stats":null,"previous_names":["mowtwo/vite-plugin-utools-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mowtwo/vite-plugin-utools-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mowtwo%2Fvite-plugin-utools-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mowtwo%2Fvite-plugin-utools-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mowtwo%2Fvite-plugin-utools-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mowtwo%2Fvite-plugin-utools-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mowtwo","download_url":"https://codeload.github.com/mowtwo/vite-plugin-utools-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mowtwo%2Fvite-plugin-utools-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29423534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T22:20:51.549Z","status":"ssl_error","status_checked_at":"2026-02-13T22:20:49.838Z","response_time":78,"last_error":"SSL_read: 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":"2024-10-27T10:42:12.184Z","updated_at":"2026-02-13T23:34:05.898Z","avatar_url":"https://github.com/mowtwo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 基于 vite 开发 uTools 插件时帮助插件\n\n## 解决了什么问题\n\n### 分离 preload 部分\n\n目前 preload 部分使用的是 nodejs 的 api，完全独立于渲染进程，所以默认规范了 preload 以及 plugin.json 还有 logo 文件的位置\n\n通过在插件函数设定参数来辅助扫描\n\n```ts\nimport { defineConfig } from \"vite\";\nimport utools from \"../dist/index\";\n\nexport default defineConfig({\n  plugins: [utools(\"public/logo.png\", \"src-utools\")],\n});\n```\n\n### uTools 不支持 esm\n\nuTools 目前仅支持加载 cjs，当你使用 vite，并且在最外层的 package.json 设置`type`为`module`时，会导致调试的时候报错，因此会自动检测外层的 package.json 是否是 esm，如果是，则会在对应目录下创建一个 package.json 文件并设置`type`为`common`\n\n### 支持 ts\n\n内部调用了 tsup 帮助打包，并且支持配置实现不压缩，配置 noExternal 保证可以复制库代码\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmowtwo%2Fvite-plugin-utools-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmowtwo%2Fvite-plugin-utools-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmowtwo%2Fvite-plugin-utools-plugin/lists"}