Vue3 + Pinia + Vite5 仿抖音,完全度90% . Vue3 + Pinia + Vite5 imitate TikTok with 90% completeness
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

51 lines
1.0 KiB

import {defineConfig, searchForWorkspaceRoot} from 'vite'
import Vue from '@vitejs/plugin-vue'
import VueJsx from '@vitejs/plugin-vue-jsx'
import VueMacros from 'unplugin-vue-macros/vite'
import {resolve} from 'path'
function pathResolve(dir) {
return resolve(__dirname, ".", dir)
}
export const ssrTransformCustomDir = () => {
return {
props: [],
needRuntime: true
}
}
// https://vitejs.dev/config/
export default defineConfig({
base: './',
plugins: [
// VueMacros({
// plugins: {
// vue: Vue(),
// vueJsx: VueJsx(), // if needed
// },
// betterDefine: true,
// // reactivityTransform: {
// // exclude: [/node_modules/, /jQuery\.js/]
// // }
// }),
Vue(),
VueJsx(),
],
resolve: {
alias: {
"@": pathResolve("src"),
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
build: {
sourcemap: false
},
server: {
port: 3000,
open: true,
host: '0.0.0.0',
fs: {
strict: false,
}
}
})