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
-
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)
- Storybook conflicts with Vue 3 and makes volar think that code in templates is JSX so you get errors about stuff like
class
shoudl beclassName
- Needs to be fixed by setting
"types": ["vite/client"]
in tsconfigcompilerOptions
and adding**/*.stories.ts
to theexcludes
- Needs to be fixed by setting
- Currently cannot import interfaces for
defineProps
/defineEmits
in Vue script setup SFCs