{"id":29884055,"url":"https://github.com/indexxuan/vite-plugin-mpa","last_synced_at":"2025-08-25T22:08:36.415Z","repository":{"id":38320125,"uuid":"339980748","full_name":"IndexXuan/vite-plugin-mpa","owner":"IndexXuan","description":"MPA(multi page application) for vite.","archived":false,"fork":false,"pushed_at":"2023-06-16T13:04:51.000Z","size":171,"stargazers_count":239,"open_issues_count":14,"forks_count":36,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-25T08:28:21.532Z","etag":null,"topics":["vite","vite-plugin"],"latest_commit_sha":null,"homepage":"","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/IndexXuan.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}},"created_at":"2021-02-18T08:17:21.000Z","updated_at":"2025-08-06T11:28:30.000Z","dependencies_parsed_at":"2024-01-07T18:04:11.035Z","dependency_job_id":"6be7b625-0eeb-422c-9e6c-ea68422d0662","html_url":"https://github.com/IndexXuan/vite-plugin-mpa","commit_stats":{"total_commits":44,"total_committers":8,"mean_commits":5.5,"dds":0.2954545454545454,"last_synced_commit":"3c31857792e4ab0b4dc166e961f3314893647940"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IndexXuan/vite-plugin-mpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndexXuan%2Fvite-plugin-mpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndexXuan%2Fvite-plugin-mpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndexXuan%2Fvite-plugin-mpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndexXuan%2Fvite-plugin-mpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IndexXuan","download_url":"https://codeload.github.com/IndexXuan/vite-plugin-mpa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndexXuan%2Fvite-plugin-mpa/sbom","scorecard":{"id":66165,"data":{"date":"2025-08-11","repo":{"name":"github.com/IndexXuan/vite-plugin-mpa","commit":"db3407474756097cb6d6e3569017ef89646843bb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 8/17 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/npm-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/IndexXuan/vite-plugin-mpa/npm-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/IndexXuan/vite-plugin-mpa/npm-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/npm-publish.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/IndexXuan/vite-plugin-mpa/npm-publish.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"40 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ff7x-qrg7-qggm","Warn: Project is vulnerable to: GHSA-67mh-4wv8-2f99","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-h726-x36v-rx45","Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-3mv9-4h5g-vhg3","Warn: Project is vulnerable to: GHSA-mv48-hcvh-8jj8","Warn: Project is vulnerable to: GHSA-353f-5xf4-qw67","Warn: Project is vulnerable to: GHSA-64vr-g452-qvp3","Warn: Project is vulnerable to: GHSA-9cwx-2883-4wfx","Warn: Project is vulnerable to: GHSA-vg6x-rcgg-rjx6","Warn: Project is vulnerable to: GHSA-x574-m823-4x7w","Warn: Project is vulnerable to: GHSA-4r4m-qw57-chr8","Warn: Project is vulnerable to: GHSA-xcj6-pq6g-qj4x","Warn: Project is vulnerable to: GHSA-356w-63v5-8wf4","Warn: Project is vulnerable to: GHSA-859w-5945-r5v3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T02:38:47.750Z","repository_id":38320125,"created_at":"2025-08-15T02:38:47.750Z","updated_at":"2025-08-15T02:38:47.750Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272139014,"owners_count":24880224,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["vite","vite-plugin"],"created_at":"2025-07-31T14:25:20.349Z","updated_at":"2025-08-25T22:08:36.407Z","avatar_url":"https://github.com/IndexXuan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vite-plugin-mpa\n\n\u003e Out-of-the-box multi-page-application (MPA) support for Vite - supports Vue2/3, React and others\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"wakatime\" src=\"https://wakatime.com/badge/github/IndexXuan/vite-plugin-mpa.svg\" /\u003e\n  \u003ca href=\"https://github.com/IndexXuan/vite-plugin-mpa/actions/workflows/npm-publish.yml\"\u003e\n   \u003cimg alt=\"NPM Publish\" src=\"https://github.com/IndexXuan/vite-plugin-mpa/actions/workflows/npm-publish.yml/badge.svg\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vite-plugin-mpa\" rel=\"nofollow\"\u003e\n    \u003cimg alt=\"downloads\" src=\"https://img.shields.io/npm/dt/vite-plugin-mpa.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/vite-plugin-mpa\" rel=\"nofollow\"\u003e\n    \u003cimg alt=\"npm version\" src=\"https://img.shields.io/npm/v/vite-plugin-mpa.svg\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/IndexXuan/vite-plugin-mpa/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## Motivation\n\n- Vite [natively supports multi-page apps](https://vitejs.dev/guide/build.html#multi-page-app), but you must configure `rollupOptions.input` manually\n- When running vite dev, you must open `localhost:3000/src/pages/index/xxx.html` for `$projectRoot/src/pages/index/xxx.html`\n- Similar to vue-cli, this plugin helps rewrite urls for MPA and auto open the first page for you\n- Experimental: when building, organize the folder for you (like vue-cli) - e.g `dist/src/pages/subpage/index.html` will move to `dist/subpage/index.html`\n\n## Usage\n\n```sh\nyarn add vite-plugin-mpa\n```\n\n```ts\n// vite.config.ts\nimport mpa from 'vite-plugin-mpa'\n\n// @see https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [\n    // ...other plugins\n    mpa(/* options */),\n  ],\n})\n```\n\n## Options\n\n```ts\n{\n  /**\n   * open url path when server starts (customizable)\n   * @default path of first-page\n   */\n  open: string\n  /**\n   * where to locate pages\n   * @default 'src/pages', e.g. src/views\n   */\n  scanDir: string\n  /**\n   * how to locate page files (passed to fast-glob), e.g. index.{js,jsx}\n   * @default 'main.{js,ts,jsx,tsx}'\n   */\n  scanFile: string\n  /**\n   * what is your html file name, e.g. index.html / main.html / entry.html / template.html\n   * @default 'index.html'\n   */\n  filename: string\n}\n```\n\n- [see more](https://github.com/IndexXuan/vite-plugin-mpa/blob/main/src/lib/options.ts)\n\n## Examples\n\n- see [src/examples](https://github.com/IndexXuan/vite-plugin-mpa/blob/main/examples)\n\n- use shelljs after-build to organize dist folder (may be a better approach - help wanted)\n\n## How It Works\n\n- Uses fast-glob to collect all pages, e.g. src/pages/\\*/main.{js,ts}, and calc MPA entries\n- The result is passed into vite#rollupOptions#input\n\n\n## Further Info\n- [vue-cli-plugin-vite](https://github.com/IndexXuan/vue-cli-plugin-vite)\n- [vite-plugin-html-template](https://github.com/IndexXuan/vite-plugin-html-template)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexxuan%2Fvite-plugin-mpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findexxuan%2Fvite-plugin-mpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findexxuan%2Fvite-plugin-mpa/lists"}