Files
microapp-main-interview/vite.config.ts
2026-06-25 10:34:43 +08:00

28 lines
568 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
const __dirname = fileURLToPath(new URL('.', import.meta.url))
export default defineConfig({
plugins: [
vue({
template: {
compilerOptions: {
// 将 micro-app 标签识别为自定义元素
isCustomElement: (tag) => /^micro-app/.test(tag)
}
}
})
],
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
server: {
port: 8080
}
})