1.1.1 • Published 10 months ago

@rsbuild/plugin-basic-ssl v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

@rsbuild/plugin-basic-ssl

Generate an untrusted, self-signed certificate for the HTTPS server.

The Basic SSL plugin will automatically generate a self-signed certificate and set the 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.

Usage

Install:

npm add @rsbuild/plugin-basic-ssl -D

Add plugin to your rsbuild.config.ts:

// rsbuild.config.ts
import { pluginBasicSsl } from "@rsbuild/plugin-basic-ssl";

export default {
  plugins: [pluginBasicSsl()],
};

Then visit the https URL of the page, and confirm in your browser.

Options

If you need to customize the compilation behavior of Sass, you can use the following configs.

filename

Filename of the generated certificate.

  • Type: string
  • Default: 'fake-cert.pem'
  • Example:
pluginBasicSsl({
  filename: "foo.pem",
});

outputPath

Output path of the generated certificate.

  • Type: string
  • Default: __dirname
  • Example:
import path from "node:path";

pluginBasicSsl({
  outputPath: path.join(__dirname, "node_modules/.cache/cert"),
});

selfsignedAttrs

Attributes passing to selfsigned, see selfsigned for details.

  • Type: CertificateField[]
  • Default:
const defaultAttrs = [{ name: "commonName", value: "localhost" }];
  • Example:
pluginBasicSsl({
  selfsignedAttrs: [{ name: "commonName", value: "example.com" }],
});

selfsignedOptions

Options passing to selfsigned, see selfsigned - Options for details.

  • Type: SelfsignedOptions
  • Default:
const defaultOptions = {
  days: 30,
  keySize: 2048,
};
  • Example:
pluginBasicSsl({
  selfsignedOptions: {
    days: 100,
  },
});

License

MIT.

1.1.1

10 months ago

1.1.0

11 months ago

0.7.10

12 months ago

0.7.9

12 months ago

1.0.0

12 months ago

0.7.6

1 year ago

0.7.5

1 year ago

0.7.8

12 months ago

0.7.7

12 months ago

0.7.0-beta.8

1 year ago

0.7.0-beta.9

1 year ago

0.7.0-beta.7

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.7.4

1 year ago

0.7.3

1 year ago

0.7.0

1 year ago

0.7.0-beta.6

1 year ago

0.7.0-beta.5

1 year ago

0.7.0-beta.4

1 year ago

0.7.0-beta.1

1 year ago

0.7.0-beta.2

1 year ago

0.7.0-beta.3

1 year ago

0.7.0-beta.0

1 year ago

0.6.15

1 year ago

0.6.14

1 year ago

0.6.12

1 year ago

0.6.13

1 year ago

0.6.10

1 year ago

0.6.11

1 year ago

0.6.9

1 year ago

0.6.8

1 year ago

0.6.7

1 year ago

0.6.6

1 year ago