Skip to content

Dropz-to-a/front

Repository files navigation

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

환경 변수 설정

프로젝트를 실행하기 전에 환경 변수를 설정해야 합니다.

  1. 프로젝트 루트에 .env 파일을 생성하세요
  2. .env.example 파일을 참고하여 필요한 환경 변수를 설정하세요

필수 환경 변수

  • VITE_TOSS_CLIENT_KEY: Toss Payments 클라이언트 키
    • Toss Payments 관리자 페이지에서 발급받은 클라이언트 키를 입력하세요
    • 테스트 환경: test_ck_... 로 시작
    • 운영 환경: live_ck_... 로 시작

환경 변수 설정 예시

VITE_TOSS_CLIENT_KEY=test_ck_DpexMgkW36w4qN7k3V8L0X9bzQ6y

환경 변수를 설정한 후 개발 서버를 재시작해야 합니다.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

About

태호 창연 건형 현제

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages