Writing Your First Vite Plugin

This repository contains examples to gradually learn how Vite Plugin works.

  • example1: rollup config to replace content
  • example2: rollup config to demonstrate a virtual module
  • example3: vite config for macro plugin to compute things on build time
  • example4: the same as example3, but with TypeScript support
  • example5-react: vite config to import text file and transform it to react component
  • example5-vue: vite config to import text file and transform it to vue component

난생처음 만드는 Vite Plugin

이 Repository 는 Vite Plugin 이 어떻게 작동하는지 이해하기 위한 점진적인 예제를 제공합니다.

  • example1: 컨텐츠를 교체하는 rollup 설정
  • example2: Virtual Module 을 설명하기 위한 rollup 설정
  • example3: 빌드 타임에 연산을 하기 위한 매크로 Vite Plugin
  • example4: example3 과 동일 + TyepScript 지원
  • example5-react: 텍스트 파일을 React 컴포넌트로 변환해주는 Vite Plugin
  • example5-vue: 텍스트 파일을 Vue 컴포넌트로 변환해주는 Vite Plugin