File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useState } from "react" ;
22import axios from "axios" ;
3- import env from "react-dotenv" ;
4-
3+ const url = process . env . REACT_APP_BACKEND_URL ;
54import {
65 FaDiscord ,
76 FaReddit ,
@@ -12,7 +11,6 @@ import {
1211} from 'react-icons/fa' ;
1312
1413const Contact = ( ) => {
15- const url = env . url ;
1614 const [ data , setData ] = useState ( {
1715 name : "" ,
1816 email : "" ,
Original file line number Diff line number Diff line change 1- import { defineConfig } from "vite " ;
1+ import path from "path " ;
22import react from "@vitejs/plugin-react" ;
3- import viteTsconfigPaths from "vite-tsconfig-paths" ;
4- import svgrPlugin from "vite-plugin-svgr" ;
5-
6- // https://vitejs.dev/config/
3+ import { defineConfig } from "vite" ;
4+ import { config } from 'dotenv' ;
5+ config ( ) ;
76export default defineConfig ( {
8- server : {
9- watch : {
10- usePolling : true ,
7+ plugins : [ react ( ) ] ,
8+ resolve : {
9+ alias : {
10+ "@" : path . resolve ( __dirname , "./src" ) ,
1111 } ,
12- host : true ,
13- port : 8080 ,
1412 } ,
15-
16- plugins : [
17- react ( ) ,
18- viteTsconfigPaths ( ) ,
19- svgrPlugin ( {
20- svgrOptions : {
21- icon : true ,
22- } ,
23- } ) ,
24- ] ,
25- } ) ;
13+ define : {
14+ 'process.env' : process . env
15+ }
16+ } ) ;
You can’t perform that action at this time.
0 commit comments