安裝:2種方式
項目外執行
tnpm init vite-app 項目名
yarn create vite-app 項目名
創建react項目:創建個目錄,目錄中執行
tnpm init vite-app --template react
yarn create vite-app --template react
安裝sass
yarn add -D sass
使用sass
<style lang="scss">
使用ts
<script lang="ts">
使用jsx
template中: <A1 /> script中: import A1 from "./a1"; export default的components中加入組件名 components: { A1, },