30 lines
655 B
JavaScript
30 lines
655 B
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue({
|
|
template: {
|
|
compilerOptions: {
|
|
// 告诉 Vue 编译器,所有以 'hover-' 开头的标签都是自定义元素
|
|
isCustomElement: (tag) => tag.startsWith('hover-')
|
|
}
|
|
}
|
|
}),
|
|
vueDevTools(),
|
|
],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3000
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
|
},
|
|
},
|
|
})
|