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: 4 months 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-27T01:11:46.000Z (6 months ago)
- Last Synced: 2025-12-28T16:59:35.525Z (6 months ago)
- Language: TypeScript
- Size: 91.8 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 🎉
[](https://www.npmjs.com/package/vite-plugin-secure-now)
[](https://github.com/psyirius/vite-plugin-secure-now/blob/main/LICENSE)
> [!WARNING]
> **This plugin is currently not working.**
>
> Please refer to [this commit](https://github.com/pyrou/traefik.me/commit/16fc1fc17edc298c39e87343873dca5d3894a928) for more info.
## Screenshots

## 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)