feat: move to vite for faster builld

This commit is contained in:
ckt1031
2023-07-15 21:41:23 +08:00
parent caabdd1e21
commit 4e94c85a9a
63 changed files with 411 additions and 16907 deletions

View File

@@ -38,7 +38,7 @@ const Footer = () => {
) : (
<div className='custom-footer'>
<a href='https://github.com/songquanpeng/one-api' target='_blank'>
{systemName} {process.env.REACT_APP_VERSION}{' '}
{systemName} {import.meta.env.VITE_REACT_APP_VERSION}{' '}
</a>
{' '}
<a href='https://github.com/songquanpeng' target='_blank'>

View File

@@ -99,7 +99,7 @@ const OtherSetting = () => {
'https://api.github.com/repos/songquanpeng/one-api/releases/latest',
);
const { tag_name, body } = res.data;
if (tag_name === process.env.REACT_APP_VERSION) {
if (tag_name === import.meta.env.VITE_REACT_APP_VERSION) {
showSuccess(`已是最新版本:${tag_name}`);
} else {
setUpdateData({

View File

@@ -2,7 +2,7 @@ import { showError } from './utils';
import axios from 'axios';
export const API = axios.create({
baseURL: process.env.REACT_APP_SERVER ? process.env.REACT_APP_SERVER : '',
baseURL: import.meta.env.VITE_REACT_APP_SERVER ? import.meta.env.VITE_REACT_APP_SERVER : '',
});
API.interceptors.response.use(