convert to vite
This commit is contained in:
parent
fe9107dfb0
commit
c6ee1f6078
19
index.html
Normal file
19
index.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
|
||||
<title>Dashboard - Structure</title>
|
||||
</head>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
11
package.json
11
package.json
|
|
@ -3,6 +3,7 @@
|
|||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.4.0",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@mui/icons-material": "^5.14.19",
|
||||
"@react-google-maps/api": "^2.19.2",
|
||||
|
|
@ -65,9 +66,9 @@
|
|||
"zustand": "^4.4.5"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"start": "vite",
|
||||
"build": "vite build",
|
||||
"serve": "vite preview",
|
||||
"eject": "react-scripts eject",
|
||||
"g:api": "node src/Extensions/FileGenerator/generateApi.js",
|
||||
"g:column": "node src/Extensions/FileGenerator/generateColumn.js",
|
||||
|
|
@ -95,6 +96,8 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react-toggle": "^4.0.5"
|
||||
"@types/react-toggle": "^4.0.5",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"vite": "^5.3.5"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
<title>Dashboard - Structure</title>
|
||||
</head>
|
||||
<script type="module" src="/src/index.tsx"></script>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ import {
|
|||
} from '@ant-design/icons';
|
||||
import React from 'react';
|
||||
import { Image, Space } from 'antd';
|
||||
import { BaseURL, BaseURL_IMAGE } from '../../api/config';
|
||||
|
||||
|
||||
const ColumnsImage= ({src}:any) => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Button, Upload, UploadFile } from "antd";
|
||||
import useFormField from "../../../Hooks/useFormField";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import React, { useMemo } from "react";
|
||||
import { FaUpload } from "react-icons/fa";
|
||||
|
||||
const File = ({
|
||||
name,
|
||||
|
|
@ -66,7 +66,7 @@ const File = ({
|
|||
>
|
||||
<Button
|
||||
className={isError ? "isError w-100 " : " w-100"}
|
||||
icon={<UploadOutlined />}
|
||||
icon={<FaUpload />}
|
||||
>
|
||||
{placeholder
|
||||
? t(`input.${placeholder}`)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useMemo } from "react";
|
||||
import { Button, Upload } from "antd";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import useFormField from "../../../Hooks/useFormField";
|
||||
import { FaUpload } from "react-icons/fa";
|
||||
|
||||
const MaltyFile = ({
|
||||
name,
|
||||
|
|
@ -73,7 +73,7 @@ const MaltyFile = ({
|
|||
>
|
||||
<Button
|
||||
className={isError ? "isError w-100" : "w-100"}
|
||||
icon={<UploadOutlined />}
|
||||
icon={<FaUpload />}
|
||||
>
|
||||
{t(`input.` + placeholder) ?? t("input.upload_image")}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
export const BaseURL = `http://127.0.0.1:8000/`;
|
||||
export const BaseURL = `http://192.168.1.102:8000/`;
|
||||
|
||||
|
||||
export const BaseURL_IMAGE = '';
|
||||
|
|
|
|||
11
vite.config.js
Normal file
11
vite.config.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
export default defineConfig(() => {
|
||||
return {
|
||||
build: {
|
||||
outDir: 'build',
|
||||
},
|
||||
plugins: [react()],
|
||||
};
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user