-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathvite.config.ts
27 lines (25 loc) · 983 Bytes
/
vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import react from '@vitejs/plugin-react-swc';
import mkcert from 'vite-plugin-mkcert';
// https://vitejs.dev/config/
export default defineConfig({
base: '/reactjs-template',
plugins: [
// Allows using React dev server along with building a React application with Vite.
// https://npmjs.com/package/@vitejs/plugin-react-swc
react(),
// Allows using the compilerOptions.paths property in tsconfig.json.
// https://www.npmjs.com/package/vite-tsconfig-paths
tsconfigPaths(),
// Creates a custom SSL certificate valid for the local machine.
// Using this plugin requires admin rights on the first dev-mode launch.
// https://www.npmjs.com/package/vite-plugin-mkcert
process.env.HTTPS && mkcert(),
],
publicDir: './public',
server: {
// Exposes your dev server and makes it accessible for the devices in the same network.
host: true,
},
});