refactor: 移除未使用的图标导入并更新vite配置
移除HomePage2和GroupStorePage中未使用的ChevronRight和Clock图标 更新vite配置以支持环境变量和基础路径设置
This commit is contained in:
parent
829ee9a1c1
commit
57e5f35803
|
|
@ -1,6 +1,6 @@
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { motion } from 'framer-motion'
|
import { motion } from 'framer-motion'
|
||||||
import { ChevronLeft, Star, MapPin, Clock, Bus } from 'lucide-react'
|
import { ChevronLeft, Star, MapPin, Bus } from 'lucide-react'
|
||||||
import { factoryStores } from '@/mock/groupData'
|
import { factoryStores } from '@/mock/groupData'
|
||||||
|
|
||||||
export default function GroupStorePage() {
|
export default function GroupStorePage() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { motion } from 'framer-motion'
|
import { motion } from 'framer-motion'
|
||||||
import { ChevronLeft, ChevronRight, Check } from 'lucide-react'
|
import { ChevronLeft, Check } from 'lucide-react'
|
||||||
|
|
||||||
const timeSlots = [
|
const timeSlots = [
|
||||||
{ id: 1, time: '09:00-11:00', available: true },
|
{ id: 1, time: '09:00-11:00', available: true },
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,17 @@
|
||||||
import { defineConfig } from 'vite'
|
import { defineConfig, loadEnv } from 'vite'
|
||||||
import react from '@vitejs/plugin-react'
|
import react from '@vitejs/plugin-react'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig(({ mode }) => {
|
||||||
plugins: [react()],
|
const env = loadEnv(mode, process.cwd(), '')
|
||||||
resolve: {
|
|
||||||
alias: {
|
return {
|
||||||
'@': path.resolve(__dirname, './src'),
|
base: env.VITE_BASE_PATH || '/',
|
||||||
|
plugins: [react()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue