Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.28 KB

NOTES.md

File metadata and controls

31 lines (23 loc) · 1.28 KB

Turbo repo setup for Vite/Vue3

Goal

Create a basic turborepo setup using Vue 3, Vite, Storybook and pnpm

  • Vite is a lightening fast HMR server and bundler
    • originally written for Vue 3 but platform agnostic now
    • Vue plugin for vite enable script setup syntax for greatly improve experience in SFCs
    • Volar over Vetur for even better type safety especially in templates
  • Storybook
    • Great design system to work with a component library

Tasks

  • WARNING: Until vercel/turborepo#962 is resolved you need to install Yarn as well

  • Remove all React/NextJS autogenerated code

    • apps/*
    • packages/ui
    • packages/tsconfig/react-library.json
    • packages/tsconfig/nextjs.json
    • References to nextjs in various package.json and tsconfig files
  • Configure new vite apps to use workspaces (in package.json, replace tsconfig with one that extends common configs, etc)

Issues

  • Storybook conflicts with Vue 3 and makes volar think that code in templates is JSX so you get errors about stuff like class shoudl be className
    • Needs to be fixed by setting "types": ["vite/client"] in tsconfig compilerOptions and adding **/*.stories.ts to the excludes
  • Currently cannot import interfaces for defineProps/defineEmits in Vue script setup SFCs