Files
child-vue2-interview/vite.config.js
2026-06-20 11:42:05 +08:00

19 lines
525 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue2'
import path from 'node:path'
// import vueJsx from '@vitejs/plugin-vue2-jsx' // 如需 JSX
export default defineConfig({
plugins: [
vue(),
// vueJsx() // 开启 JSX 支持
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
// Vue2 完整构建ElementUI 等可能需要)
'vue$': 'vue/dist/vue.esm.js'
},
extensions: ['.js', '.vue', '.json']
}
})