Skip to content

Commit

Permalink
Merge branch 'main' of github.com:liuweiGL/vite-plugin-mkcert
Browse files Browse the repository at this point in the history
  • Loading branch information
liuweiGL committed Mar 20, 2024
2 parents 45a7950 + 461defd commit 4c7209a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.17.4](https://github.com/liuweiGL/vite-plugin-mkcert/compare/v1.17.3...v1.17.4) (2024-02-27)


### Bug Fixes

* the plugin reports mkcert not recognized as an internal or external command when parentheses in the folder name ([02278c8](https://github.com/liuweiGL/vite-plugin-mkcert/commit/02278c870d5a15be41a540457d1e65c927e9f8a2)), closes [#83](https://github.com/liuweiGL/vite-plugin-mkcert/issues/83)

## [1.17.3](https://github.com/liuweiGL/vite-plugin-mkcert/compare/v1.17.2...v1.17.3) (2024-01-18)


Expand Down
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,41 @@ export default defineConfig({
})
```

## Nuxt.js Quickstart

Recent version of Nuxt.js use vite under the hood. You can still use this plugin to create a certificate but you need to manually specify the certificaate for the devserver.

1. Installation dependencies

```sh
yarn add vite-plugin-mkcert -D
```

2. Configure nuxt

```ts
import mkcert from'vite-plugin-mkcert'


// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
vite: {
plugins: [
mkcert({
savePath: './certs', // save the generated certificate into certs directory
force: true, // force generation of certs even without setting https property in the vite config
})
]
},
devServer: {
https: {
cert: './certs/cert.pem',
key: './certs/dev.pem'
}
}
});
```

## Parameters
### hosts

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-mkcert",
"version": "1.17.3",
"version": "1.17.4",
"description": "Provide certificates for vite's https dev service",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4c7209a

Please sign in to comment.