{"id":13678025,"url":"https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl","last_synced_at":"2025-04-14T10:13:40.182Z","repository":{"id":246759919,"uuid":"822632658","full_name":"rspack-contrib/rsbuild-plugin-basic-ssl","owner":"rspack-contrib","description":"An Rsbuild plugin to generate an untrusted, self-signed certificate for the HTTPS server.","archived":false,"fork":false,"pushed_at":"2025-04-01T02:30:55.000Z","size":94,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-11T22:03:25.219Z","etag":null,"topics":["rsbuild","rsbuild-plugin","rspack"],"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/rspack-contrib.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":"2024-07-01T14:05:12.000Z","updated_at":"2025-04-01T02:30:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"13fe8745-2e94-4802-818a-d40f25adb2c2","html_url":"https://github.com/rspack-contrib/rsbuild-plugin-basic-ssl","commit_stats":null,"previous_names":["rspack-contrib/rsbuild-plugin-basic-ssl"],"tags_count":3,"template":false,"template_full_name":"rspack-contrib/rsbuild-plugin-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-basic-ssl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-basic-ssl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-basic-ssl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspack-contrib%2Frsbuild-plugin-basic-ssl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rspack-contrib","download_url":"https://codeload.github.com/rspack-contrib/rsbuild-plugin-basic-ssl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487716,"owners_count":21112191,"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":["rsbuild","rsbuild-plugin","rspack"],"created_at":"2024-08-02T13:00:49.488Z","updated_at":"2025-04-14T10:13:40.156Z","avatar_url":"https://github.com/rspack-contrib.png","language":"TypeScript","readme":"# @rsbuild/plugin-basic-ssl\n\nGenerate an untrusted, self-signed certificate for the HTTPS server.\n\nThe Basic SSL plugin will automatically generate a self-signed certificate and set the [server.https](https://rsbuild.dev/config/server/https) option. When you visit the page, your browser will indicate that the certificate is not trusted. You can access the HTTPS page after manually confirming this.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/@rsbuild/plugin-basic-ssl\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/@rsbuild/plugin-basic-ssl?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\nInstall:\n\n```bash\nnpm add @rsbuild/plugin-basic-ssl -D\n```\n\nAdd plugin to your `rsbuild.config.ts`:\n\n```ts\n// rsbuild.config.ts\nimport { pluginBasicSsl } from \"@rsbuild/plugin-basic-ssl\";\n\nexport default {\n  plugins: [pluginBasicSsl()],\n};\n```\n\nThen visit the https URL of the page, and confirm in your browser.\n\n## Options\n\n### filename\n\nFilename of the generated certificate.\n\n- **Type:** `string`\n- **Default:** `'fake-cert.pem'`\n- **Example:**\n\n```ts\npluginBasicSsl({\n  filename: \"foo.pem\",\n});\n```\n\n### outputPath\n\nOutput path of the generated certificate.\n\n- **Type:** `string`\n- **Default:** `__dirname`\n- **Example:**\n\n```ts\nimport path from \"node:path\";\n\npluginBasicSsl({\n  outputPath: path.join(__dirname, \"node_modules/.cache/cert\"),\n});\n```\n\n### selfsignedAttrs\n\nAttributes passing to `selfsigned`, see [selfsigned](https://github.com/jfromaniello/selfsigned) for details.\n\n- **Type:** `CertificateField[]`\n- **Default:**\n\n```ts\nconst defaultAttrs = [{ name: \"commonName\", value: \"localhost\" }];\n```\n\n- **Example:**\n\n```ts\npluginBasicSsl({\n  selfsignedAttrs: [{ name: \"commonName\", value: \"example.com\" }],\n});\n```\n\n### selfsignedOptions\n\nOptions passing to `selfsigned`, see [selfsigned - Options](https://github.com/jfromaniello/selfsigned?tab=readme-ov-file#options) for details.\n\n- **Type:** `SelfsignedOptions`\n- **Default:**\n\n```ts\nconst defaultOptions = {\n  days: 30,\n  keySize: 2048,\n};\n```\n\n- **Example:**\n\n```ts\npluginBasicSsl({\n  selfsignedOptions: {\n    days: 100,\n  },\n});\n```\n\n## License\n\n[MIT](./LICENSE).\n","funding_links":[],"categories":["Plugins"],"sub_categories":["Rsbuild Plugins"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-basic-ssl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-basic-ssl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspack-contrib%2Frsbuild-plugin-basic-ssl/lists"}