Skip to content

Commit 3d72c7b

Browse files
authored
Merge pull request #403 from ryoldash/u-rashid
ReactJS template bug fixes for production build
2 parents deaf957 + 9afdb52 commit 3d72c7b

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

reactjs/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
GENERATE_SOURCEMAP=false
12
REACT_APP_APP_BASE_URL="http://www.ryoldash.com/"
23
REACT_APP_REMOTE_SERVICE_BASE_URL="http://www.ryoldash.com/"

reactjs/.env.production

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
GENERATE_SOURCEMAP=false
12
REACT_APP_APP_BASE_URL="http://www.ryoldash.com/"
23
REACT_APP_REMOTE_SERVICE_BASE_URL="http://www.ryoldash.com/"

reactjs/config-overrides.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ module.exports = function override(config, env) {
3838
config.plugins.push(
3939
(process.env.NODE_ENV === 'production') ?
4040
new CopyWebpackPlugin([{
41-
from: 'node_modules/@aspnet/signalr/dist/browser/signalr.min.js'
41+
from: 'node_modules/@aspnet/signalr/dist/browser/signalr.min.js',
42+
to: 'dist'
4243
}, {
43-
from: 'node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js'
44+
from: 'node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr-client.js',
45+
to: 'dist'
4446
}, {
45-
from: 'src/lib/abp.js'
47+
from: 'src/lib/abp.js',
48+
to: 'dist'
4649
}]) :
4750
new CopyWebpackPlugin([{
4851
from: 'node_modules/@aspnet/signalr/dist/browser/signalr.min.js',

reactjs/src/services/httpService.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ import axios from 'axios';
22
import AppConsts from './../lib/appconst';
33
import { Modal } from 'antd';
44
import { L } from 'src/lib/abpUtility';
5+
const qs = require('qs');
56

67
const http = axios.create({
78
baseURL: AppConsts.remoteServiceBaseUrl,
89
timeout: 30000,
10+
paramsSerializer: function(params) {
11+
return qs.stringify(params, {
12+
encode: false,
13+
});
14+
},
915
});
1016

1117
http.interceptors.request.use(

reactjs/src/stores/storeIdentifier.ts

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
import RoleStore from './roleStore';
2-
import TenantStore from './tenantStore';
3-
import UserStore from './userStore';
4-
import SessionStore from './sessionStore';
5-
import AuthenticationStore from './authenticationStore';
6-
import AccountStore from './accountStore';
7-
81
export default class Stores {
9-
static AuthenticationStore: string = getName(AuthenticationStore);
10-
static RoleStore: string = getName(RoleStore);
11-
static TenantStore: string = getName(TenantStore);
12-
static UserStore: string = getName(UserStore);
13-
static SessionStore: string = getName(SessionStore);
14-
static AccountStore: string = getName(AccountStore);
15-
}
16-
17-
function getName(store: any): string {
18-
return abp.utils.toCamelCase(store.name);
2+
static AuthenticationStore: string = 'authenticationStore';
3+
static RoleStore: string = 'roleStore';
4+
static TenantStore: string = 'tenantStore';
5+
static UserStore: string = 'userStore';
6+
static SessionStore: string = 'sessionStore';
7+
static AccountStore: string = 'accountStore';
198
}

0 commit comments

Comments
 (0)