123456789101112131415161718192021222324252627282930313233 |
- import path from 'path'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import legacy from '@vitejs/plugin-legacy'
- // https://vitejs.dev/config/
- export default defineConfig(({ command }) => ({
- plugins: [vue(), command === 'build' && legacy()].filter(Boolean),
- resolve: {
- alias: {
- '@': path.join(__dirname, 'src'),
- '@img': path.join(__dirname, 'src/assets'),
- },
- },
- css: {
- preprocessorOptions: {
- scss: {
- additionalData:
- '@import "@/style/_variables.scss", "@/style/_mixins.scss";',
- },
- },
- },
- base: '/ptc/',
- server: {
- proxy: {
- '/api/': {
- target: 'http://t.ptcrepair.com.au',
- changeOrigin: true,
- rewrite: path => path.replace(/^\/api/, ''),
- },
- },
- },
- }))
|