Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/psyirius/vite-plugin-secure-now
A Vite plugin to get instant https for your dev server
https://github.com/psyirius/vite-plugin-secure-now
Last synced: 10 days ago
JSON representation
A Vite plugin to get instant https for your dev server
- Host: GitHub
- URL: https://github.com/psyirius/vite-plugin-secure-now
- Owner: psyirius
- License: mit
- Created: 2024-12-19T18:07:48.000Z (16 days ago)
- Default Branch: main
- Last Pushed: 2024-12-19T20:44:54.000Z (15 days ago)
- Last Synced: 2024-12-19T21:32:57.943Z (15 days ago)
- Language: TypeScript
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
###
Vite Plugin Secure Now 🎉
[![npm version](https://img.shields.io/npm/v/vite-plugin-secure-now.svg?style=flat-square)](https://www.npmjs.com/package/vite-plugin-secure-now)
[![license](https://img.shields.io/npm/l/vite-plugin-secure-now.svg?style=flat-square)](https://github.com/psyirius/vite-plugin-secure-now/blob/main/LICENSE)A Vite plugin to get instant HTTPS for your development server.
## Screenshots
![Vite Console](https://github.com/psyirius/vite-plugin-secure-now/raw/main/assets/images/screenshot-0.png)
## Features
- **Instant HTTPS**: Automatically sets up HTTPS for your Vite dev server.
- **Easy Integration**: Simple configuration and seamless integration with Vite.
- **Secure Context Development**: Develop for [Secure contexts](https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts) without any hassle.## How It Works
This plugin configures Vite's dev server to use the ssl certificate from [traefik.me](https://traefik.me/) to resolve to local ip addresses.
## Installation
### NPM
```sh
npm install vite-plugin-secure-now --save-dev
```### Yarn
```sh
yarn add vite-plugin-secure-now --dev
```### PNPM
```sh
pnpm add vite-plugin-secure-now --save-dev
```## Usage
```js
// vite.config.js | vite.config.ts
import { defineConfig } from 'vite';
import secureNow from 'vite-plugin-secure-now';export default defineConfig({
plugins: [
secureNow(),
],
});
```## Options
```ts
interface Options {
/**
* Whether to enable HTTPS for the dev server.
* @default true
*/
dev?: boolean;
/**
* Whether to enable HTTPS for the preview server.
* @default true
*/
preview?: boolean;
/**
* The subdomain prefix for the HTTPS URL.
* You can use different combinations supported with: https://traefik.me/
* Note: The subdomain should not be nested.
* @default 'vite'
*/
prefix?: string;
}
```## Issues
If you encounter any issues, please [open an issue](https://github.com/psyirius/vite-plugin-secure-now/issues) on GitHub.
## License
[MIT](https://choosealicense.com/licenses/mit/)
## Authors
- [@psyirius](https://www.github.com/psyirius)