Skip to content

Commit

Permalink
Add basic-ssl plugin in vite to remove openssl new key generation (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelem authored May 24, 2024
1 parent fce75fa commit d3f3205
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ To get started, follow these steps:
```bash
> git clone --recurse-submodules https://github.com/webmachinelearning/webnn-samples
> cd webnn-samples
> openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
> npm install
> npm start
> npm run start
```
2. Navigate to the desired sample directory that you want to explore.
3. Read the accompanying README.md file for the sample to understand its purpose, requirements, and implementation details.
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
"@babel/plugin-syntax-top-level-await": "^7.12.1",
"eslint": "^7.5.0",
"eslint-config-google": "^0.14.0",
"http-server": "^0.12.3"
"@vitejs/plugin-basic-ssl": "^1.1.0",
"vite": "^5.1.7"
},
"scripts": {
"lint": "eslint . --ext .js",
"start": "http-server -S cert.pem -o"
"start": "vite --host"
},
"dependencies": {
"babel-eslint": "^8.0.3"
Expand Down
9 changes: 9 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {defineConfig} from 'vite';
import basicSsl from '@vitejs/plugin-basic-ssl';

export default defineConfig({
build: {
target: 'esnext',
},
plugins: [basicSsl()],
});

0 comments on commit d3f3205

Please sign in to comment.