Front-End

vite 로컬에서 https 설정

딸기케잌🍓 2023. 8. 20. 18:29

vite.config.ts 파일수정

 

yarn add vite-plugin-mkcert -D

 

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import mkcert from 'vite-plugin-mkcert';
// https://vitejs.dev/config/
export default defineConfig({
  server: { https: { key: './yourKey.key', cert: './yourCert.crt' } },
  plugins: [
    react({
      jsxImportSource: '@emotion/react',
      babel: {
        plugins: ['@emotion/babel-plugin'],
      },
    }),
    tsconfigPaths(),
    mkcert(),
  ],
});

'Front-End' 카테고리의 다른 글

[html]개행 표시하기  (0) 2023.12.02
[끄적끄적] CSS 스타일링 고민  (0) 2023.11.20
Ag gird 정리  (0) 2023.02.08