Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More →
Socket
Sign inDemoInstall
Socket

vite-plugin-mkcert

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-mkcert - npm Package Compare versions

Comparing version 1.6.0 to 1.6.1

.editorconfig

40

package.json
{
"name": "vite-plugin-mkcert",
"version": "1.6.0",
"version": "1.6.1",
"description": "Provide certificates for vite's https dev service",

@@ -21,6 +21,20 @@ "repository": {

"homepage": "https://github.com/liuweiGL/vite-plugin-mkcert#readme",
"main": "dist/index",
"engines": {
"node": ">=v16.0.0"
},
"packageManager": "pnpm@7.0.0+",
"types": "./dist/index.d.ts",
"module": "./dist/mkcert.es.js",
"main": "./dist/mkcert.cjs.js",
"exports": {
".": {
"import": "./dist/mkcert.es.js",
"require": "./dist/mkcert.cjs.js"
}
},
"scripts": {
"dev": "tsc -w",
"build": "rimraf dist && tsc"
"dev": "vite",
"build": "vite build && tsc -p tsconfig.build.json",
"lint": "tsc -p tsconfig.build.json && eslint \"plugin/**/*.ts\" --color --quiet",
"release": "semantic-release"
},

@@ -30,9 +44,21 @@ "dependencies": {

"axios": "^0.21.4",
"debug": "^4.3.3",
"picocolors": "^1.0.0"
"debug": "^4.3.4",
"picocolors": "^1.0.0",
"vite": "^2.9.9"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/git": "^10.0.1",
"@types/debug": "^4.1.7",
"rimraf": "^3.0.2"
"@types/node": "^17.0.35",
"@typescript-eslint/eslint-plugin": "^5.25.0",
"@typescript-eslint/parser": "^5.25.0",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"prettier": "^2.6.2",
"semantic-release": "^19.0.2",
"typescript": "latest"
}
}

@@ -1,3 +0,87 @@

## vite-plugin-mkcert
# [中文文档](README-zh_CN.md)
See: https://github.com/liuweiGL/vite-plugin-mkcert#readme
# vite-plugin-mkcert
Use mkcert to provide certificate support for vite https development services.
## When should I use this plugin
1. When you want to use `http/2` to solve the concurrency limit of vite http dev server requests, you find that the browser cache is invalid [#2725](https://github.com/vitejs/vite/issues/2725).
2. I have obsessive-compulsive disorder, and I hope that the browser will not show annoying https certificate errors.
## Effect
<details>
<summary>View</summary>
![localhost](docs/assets/screenshot/localhost.png)
![127.0.0.1](docs/assets/screenshot/127.0.0.1.png)
![localhost](docs/assets/screenshot/localip.png)
</details>
## Quick start
1. Installation dependencies
```sh
yarn add vite-plugin-mkcert -D
```
2. Configure vite
```ts
import {defineConfig} from'vite'
import mkcert from'vite-plugin-mkcert'
// https://vitejs.dev/config/
export default defineConfig({
server: {
https: true
},
plugins: [mkcert()]
})
```
## Parameters
### force
Whether to force generate.
### autoUpgrade
Whether to automatically upgrade `mkcert`.
### source
Specify the download source of `mkcert`, domestic users can set it to `coding` to download from the coding.net mirror, or provide a custom [BaseSource](plugin/mkcert/Source.ts).
### mkcertPath
If the network is restricted, you can specify a local `mkcert` file instead of downloading from the network.
### hosts
Custom hosts, default value is `localhost` + `local ip addrs`.
## Display the debugging information of the plug-in
Set the environment variable `DEBUG`=`vite:plugin:mkcert`
## CHANGELOG
[CHANGELOG](CHANGELOG.md)
## Principle
Use [mkcert](https://github.com/FiloSottile/mkcert) to install the local `CA` certificate and generate it for [server.https](https://vitejs.bootcss.com/config/#server-https) Server certificate.
## Friendly reminder
1. `mkcert` save directory: [PLUGIN_DATA_DIR](plugin/lib/constant.ts)
2. Uninstall the `CA` certificate: `mkcert uninstall`
## Thanks
- [mkcert](https://github.com/FiloSottile/mkcert)
- [daquinoaldo/https-localhost](https://github.com/daquinoaldo/https-localhost)

31

tsconfig.json
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"outDir": "./dist",
"baseUrl": ".",
"target": "ESNext",
"module": "CommonJS",
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"isolatedModules": true,
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"lib": [
"esnext",
"dom"
]
},
"include": ["src/**/*.ts"]
}
"include": [
"plugin",
"playground"
],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc