| 12345678910111213141516171819202122232425262728293031 |
- import path from 'path'
- import { defineConfig } from 'vite'
- import { createVuePlugin } from 'vite-plugin-vue2'
- export default defineConfig({
- base: '/',
- resolve: {
- alias: {
- '@': path.resolve(__dirname, 'src'),
- 'vue': 'vue/dist/vue.common'
- }
- },
- server: {
- host: '0.0.0.0',
- port: 3001
- },
- plugins: [
- createVuePlugin({
- jsx: true,
- // 解决Dom结构中会出现多余的空白字符,导致文本内容间出现分隔、行内标签间出现空格
- vueTemplateOptions: {
- compilerOptions: {
- whitespace: 'condense'
- }
- },
- jsxOptions: {
- compositionAPI: true
- }
- }),
- ]
- })
|