File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ const path = require('path');
2
2
const BundleAnalyzerPlugin =
3
3
require ( 'webpack-bundle-analyzer' ) . BundleAnalyzerPlugin ;
4
4
5
+ // change this to your local instance of the CSSS API
6
+ // source: https://github.com/csss/csss-site-backend
7
+ // (if changed, don't commit your change please!)
8
+ const API_INSTANCE = 'http://localhost:3049' ;
9
+
5
10
module . exports = {
6
11
entry : {
7
12
react : [ 'react' , 'react-dom' ] ,
@@ -34,7 +39,14 @@ module.exports = {
34
39
directory : path . join ( __dirname , 'public' )
35
40
} ,
36
41
compress : true ,
37
- port : 8080
42
+ port : 8080 ,
43
+ proxy : [
44
+ {
45
+ context : [ '/api' ] ,
46
+ target : API_INSTANCE ,
47
+ pathRewrite : { '^/api' : '' }
48
+ }
49
+ ]
38
50
} ,
39
51
plugins : [
40
52
new BundleAnalyzerPlugin ( {
You can’t perform that action at this time.
0 commit comments