{"id":15020186,"url":"https://github.com/markthree/vite-layers","last_synced_at":"2026-01-20T13:33:00.411Z","repository":{"id":148381770,"uuid":"620139273","full_name":"markthree/vite-layers","owner":"markthree","description":"layers support for vite，quickly inherit your vite configuration","archived":false,"fork":false,"pushed_at":"2024-02-28T03:54:32.000Z","size":261,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T14:46:42.515Z","etag":null,"topics":["framework","layers","vite"],"latest_commit_sha":null,"homepage":"","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/markthree.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}},"created_at":"2023-03-28T05:26:01.000Z","updated_at":"2023-04-02T02:15:31.000Z","dependencies_parsed_at":"2024-10-10T17:41:10.367Z","dependency_job_id":"b092397d-d8c2-4cae-8d38-e66e4bb0917c","html_url":"https://github.com/markthree/vite-layers","commit_stats":{"total_commits":56,"total_committers":1,"mean_commits":56.0,"dds":0.0,"last_synced_commit":"1ff2a9a9b63cee9e03ea55626f770cd6be447054"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":"markthree/node-lib-starter","purl":"pkg:github/markthree/vite-layers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fvite-layers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fvite-layers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fvite-layers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fvite-layers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markthree","download_url":"https://codeload.github.com/markthree/vite-layers/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markthree%2Fvite-layers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"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":["framework","layers","vite"],"created_at":"2024-09-24T19:54:42.162Z","updated_at":"2026-01-20T13:33:00.395Z","avatar_url":"https://github.com/markthree.png","language":"TypeScript","readme":"# vite-layers\n\nlayers support for vite，quickly inherit your vite configuration\n\n\u003cbr /\u003e\n\n## Motivation\n\nI want to inherit the configuration of the vite project in workspace and npm\npackage\n\n\u003cbr /\u003e\n\n## Features\n\n1. [x] inherit configuration file\n   - [x] npm package\n   - [x] relative position\n\n\u003cbr /\u003e\n\n## Usage\n\n### install\n\n```shell\nnpm i vite-layers -D\n```\n\n### configuration\n\n```ts\n// vite.config.ts\nimport { Layers } from \"vite-layers\";\n\nexport default Layers({\n  // Your own vite configuration now\n  vite: {\n    server: {\n      port: 3000,\n    },\n  },\n  extends: \"../vite-vue\", // The target directory you want to inherit\n});\n```\n\n#### manual import\n\n```ts\nimport Config from \"../vite-vue/vite.config.ts\"; // Manual Import Config\n// vite.config.ts\nimport { Layers } from \"vite-layers\";\n\nexport default Layers({\n  extends: Config, // The target directory you want to inherit\n});\n```\n\n#### multiple\n\n```ts\n// vite.config.ts\nimport Config from \"../vite-vue/vite.config.ts\"; // Manual Import Config\nimport { Layers } from \"vite-layers\";\n\nexport default Layers({\n  extends: [\n    \"../../vite-vue\",\n    Config,\n  ], // Multiple target directories to inherit\n});\n```\n\n#### normalize\n\n```ts\n// vite.config.ts\nimport { Layers } from \"vite-layers\";\n\nexport default Layers({\n  normalize(config) {\n    // Allows you to modify the final configuration\n    return config;\n  },\n  extends: [\n    \"../../vite-vue\",\n  ],\n});\n```\n\n#### npm package\n\n```ts\n// vite.config.ts\nimport { Layers } from \"vite-layers\";\n\nexport default Layers({\n  extends: [\n    \"package\", // your package\n  ],\n});\n```\n\n\u003cbr /\u003e\n\n### ts\n\nIf you are using TS and there is `tsconfig.node.json`, you need to add types\n\n```json5\n{\n  \"compilerOptions\": {\n    \"types\": [\"vite\"] // add vite\n    // ...other content\n  }\n}\n```\n\n\u003cbr /\u003e\n\n## inspiration\n\nInspired by [nuxt/layers](https://nuxt.com/docs/getting-started/layers)\n\n\u003cbr /\u003e\n\n## License\n\nMade with [markthree](https://github.com/markthree)\n\nPublished under [MIT License](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fvite-layers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkthree%2Fvite-layers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkthree%2Fvite-layers/lists"}