File tree 3 files changed +14
-2
lines changed
3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import shell from 'shelljs'
2
2
3
3
shell . rm ( '-Rf' , 'prod' )
4
4
shell . mkdir ( 'prod' )
5
- shell . cp ( '-R' , '.svelte-kit' , 'prod/svelte-kit' )
5
+ shell . cp ( '-R' , '.svelte-kit' , 'prod/. svelte-kit' )
6
6
shell . cp ( '-R' , 'package.json' , 'prod/package.json' )
7
+ shell . cp ( '-R' , 'build' , 'prod/build' )
7
8
shell . cp ( '-R' , 'static' , 'prod/static' )
Original file line number Diff line number Diff line change 2
2
command = " npm run build"
3
3
publish = " build/"
4
4
functions = " functions/"
5
+
6
+ [[redirects ]]
7
+ from = " /api"
8
+ to = " https://api.litekart.in"
9
+ status = 200
10
+ force = true # COMMENT: ensure that we always redirect
Original file line number Diff line number Diff line change @@ -18,7 +18,12 @@ const config = {
18
18
vite : {
19
19
server : {
20
20
proxy : {
21
- '/api' : 'https://api.litekart.in' ,
21
+ '/api' : {
22
+ target : 'https://api.litekart.in' ,
23
+ changeOrigin : true ,
24
+ rewrite : ( path ) => path . replace ( / ^ \/ a p i / , '' ) ,
25
+ } ,
26
+ // '/api': 'https://api.litekart.in/api',
22
27
} ,
23
28
} ,
24
29
ssr : {
You can’t perform that action at this time.
0 commit comments