@xmobitea/gn-typescript-client 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GNServerSettingsConfig.debug.json +3 -3
- package/dist/gn.js.client.js +50188 -0
- package/dist/gn.js.client.min.js +1 -1
- package/dist/index.d.ts +190 -190
- package/dist/index.js +24803 -22847
- package/dist/runtime/GNNetwork.d.ts +66 -67
- package/dist/runtime/GNNetworkAuthenticateApi.d.ts +28 -27
- package/dist/runtime/GNNetworkCharacterPlayerApi.d.ts +156 -156
- package/dist/runtime/GNNetworkContentApi.d.ts +33 -33
- package/dist/runtime/GNNetworkDashboardApi.d.ts +30 -30
- package/dist/runtime/GNNetworkGamePlayerApi.d.ts +153 -153
- package/dist/runtime/GNNetworkGroupApi.d.ts +120 -120
- package/dist/runtime/GNNetworkInventoryApi.d.ts +108 -108
- package/dist/runtime/GNNetworkMasterPlayerApi.d.ts +217 -217
- package/dist/runtime/GNNetworkStoreInventoryApi.d.ts +39 -39
- package/dist/runtime/common/Action0.d.ts +1 -1
- package/dist/runtime/common/Action1.d.ts +1 -1
- package/dist/runtime/common/Action2.d.ts +1 -1
- package/dist/runtime/common/Action3.d.ts +1 -1
- package/dist/runtime/common/Action4.d.ts +1 -1
- package/dist/runtime/common/GNData.d.ts +69 -69
- package/dist/runtime/config/GNServerSettings.d.ts +64 -64
- package/dist/runtime/constant/Commands.d.ts +17 -17
- package/dist/runtime/constant/EventCode.d.ts +8 -8
- package/dist/runtime/constant/OperationCode.d.ts +175 -174
- package/dist/runtime/constant/ReturnCode.d.ts +14 -14
- package/dist/runtime/constant/enumType/FriendStatus.d.ts +6 -6
- package/dist/runtime/constant/enumType/GoogleLoginType.d.ts +4 -4
- package/dist/runtime/constant/enumType/GroupStatus.d.ts +6 -6
- package/dist/runtime/constant/enumType/InvalidMemberType.d.ts +17 -17
- package/dist/runtime/constant/enumType/ItemType.d.ts +4 -4
- package/dist/runtime/constant/enumType/LoginType.d.ts +10 -10
- package/dist/runtime/constant/enumType/OwnerType.d.ts +6 -6
- package/dist/runtime/constant/enumType/PermissionDataItem.d.ts +4 -4
- package/dist/runtime/constant/enumType/RequestRole.d.ts +5 -5
- package/dist/runtime/constant/enumType/RequestType.d.ts +12 -12
- package/dist/runtime/constant/enumType/StatisticsAggregationMethod.d.ts +6 -6
- package/dist/runtime/constant/enumType/UserRoleType.d.ts +8 -8
- package/dist/runtime/constant/errorCode/GNErrorCode.d.ts +40 -39
- package/dist/runtime/constant/parameterCode/GNParameterCode.d.ts +376 -375
- package/dist/runtime/constant/parameterCode/ParameterCode.d.ts +6 -6
- package/dist/runtime/entity/DataMember.d.ts +77 -77
- package/dist/runtime/entity/GNMetadata.d.ts +22 -22
- package/dist/runtime/entity/InvalidMember.d.ts +5 -5
- package/dist/runtime/entity/OperationEvent.d.ts +14 -14
- package/dist/runtime/entity/OperationHelper.d.ts +7 -7
- package/dist/runtime/entity/OperationRequest.d.ts +21 -21
- package/dist/runtime/entity/OperationResponse.d.ts +27 -27
- package/dist/runtime/entity/models/AuthenticateModels.d.ts +116 -108
- package/dist/runtime/entity/models/AuthenticateRequestModels.d.ts +118 -111
- package/dist/runtime/entity/models/AuthenticateResponseModels.d.ts +52 -34
- package/dist/runtime/entity/models/CharacterPlayerModels.d.ts +493 -493
- package/dist/runtime/entity/models/CharacterPlayerRequestModels.d.ts +726 -726
- package/dist/runtime/entity/models/CharacterPlayerResponseModels.d.ts +148 -100
- package/dist/runtime/entity/models/ContentModels.d.ts +90 -90
- package/dist/runtime/entity/models/ContentRequestModels.d.ts +111 -111
- package/dist/runtime/entity/models/ContentResponseModels.d.ts +25 -18
- package/dist/runtime/entity/models/DashboardModels.d.ts +546 -545
- package/dist/runtime/entity/models/DashboardRequestModels.d.ts +132 -132
- package/dist/runtime/entity/models/DashboardResponseModels.d.ts +58 -40
- package/dist/runtime/entity/models/GamePlayerModels.d.ts +531 -531
- package/dist/runtime/entity/models/GamePlayerRequestModels.d.ts +711 -711
- package/dist/runtime/entity/models/GamePlayerResponseModels.d.ts +145 -98
- package/dist/runtime/entity/models/GenericModels.d.ts +59 -59
- package/dist/runtime/entity/models/GroupModels.d.ts +387 -387
- package/dist/runtime/entity/models/GroupRequestModels.d.ts +546 -546
- package/dist/runtime/entity/models/GroupResponseModels.d.ts +112 -76
- package/dist/runtime/entity/models/InventoryModels.d.ts +331 -331
- package/dist/runtime/entity/models/InventoryRequestModels.d.ts +486 -486
- package/dist/runtime/entity/models/InventoryResponseModels.d.ts +100 -68
- package/dist/runtime/entity/models/MasterPlayerModels.d.ts +767 -767
- package/dist/runtime/entity/models/MasterPlayerRequestModels.d.ts +1033 -1033
- package/dist/runtime/entity/models/MasterPlayerResponseModels.d.ts +211 -142
- package/dist/runtime/entity/models/StoreInventoryModels.d.ts +187 -187
- package/dist/runtime/entity/models/StoreInventoryRequestModels.d.ts +141 -141
- package/dist/runtime/entity/models/StoreInventoryResponseModels.d.ts +31 -22
- package/dist/runtime/entity/request/CustomOperationRequest.d.ts +21 -19
- package/dist/runtime/entity/response/CustomOperationResponse.d.ts +20 -19
- package/dist/runtime/helper/CodeHelper.d.ts +15 -15
- package/dist/runtime/helper/ConverterService.d.ts +14 -14
- package/dist/runtime/helper/GNSupport.d.ts +5 -5
- package/dist/runtime/logger/GNDebug.d.ts +15 -15
- package/dist/runtime/networking/AuthenticateStatus.d.ts +8 -11
- package/dist/runtime/networking/IPeer.d.ts +12 -12
- package/dist/runtime/networking/NetworkingPeer.d.ts +40 -40
- package/dist/runtime/networking/OperationPending.d.ts +30 -30
- package/dist/runtime/networking/PeerBase.d.ts +30 -30
- package/dist/runtime/networking/handler/IServerEventHandler.d.ts +14 -14
- package/dist/runtime/networking/handler/OnCharacterPlayerFriendUpdateEventHandler.d.ts +13 -13
- package/dist/runtime/networking/handler/OnCharacterPlayerGroupUpdateEventHandler.d.ts +13 -13
- package/dist/runtime/networking/handler/OnGamePlayerFriendUpdateEventHandler.d.ts +13 -13
- package/dist/runtime/networking/handler/OnGamePlayerGroupUpdateEventHandler.d.ts +13 -13
- package/dist/runtime/networking/handler/OnGroupMemberUpdateEventHandler.d.ts +12 -12
- package/dist/runtime/networking/handler/OnGroupMessageUpdateEventHandler.d.ts +12 -12
- package/dist/runtime/networking/http/HttpPeer.d.ts +24 -24
- package/dist/runtime/networking/http/NetworkingHttpPeerBase.d.ts +11 -11
- package/dist/runtime/networking/http/NetworkingPeerAxiosRequest.d.ts +13 -13
- package/dist/runtime/networking/socket/NetworkingPeerSocketIOClient.d.ts +25 -25
- package/dist/runtime/networking/socket/NetworkingSocketPeerBase.d.ts +48 -48
- package/dist/runtime/networking/socket/SocketPeer.d.ts +28 -28
- package/dist/runtime/typescript/ServiceUpdate.d.ts +6 -6
- package/package.json +16 -14
- package/tsconfig-build.min.udm.json +13 -0
- package/tsconfig.min.udm.json +9 -0
- package/webpack.config.min.udm.js +48 -0
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Action0 } from "../../common/Action0";
|
|
2
|
-
import { Action2 } from "../../common/Action2";
|
|
3
|
-
import { GNArray, GNHashtable } from "../../common/GNData";
|
|
4
|
-
import { RequestRole } from "../../constant/enumType/RequestRole";
|
|
5
|
-
import { RequestType } from "../../constant/enumType/RequestType";
|
|
6
|
-
import { OperationRequest } from "../../entity/OperationRequest";
|
|
7
|
-
export declare class SocketPacket {
|
|
8
|
-
obj: any;
|
|
9
|
-
encrypted: boolean;
|
|
10
|
-
constructor(obj: any, encrypted: boolean);
|
|
11
|
-
}
|
|
12
|
-
export declare abstract class NetworkingSocketPeerBase {
|
|
13
|
-
protected reconnectDelay: number;
|
|
14
|
-
protected pingInterval: number;
|
|
15
|
-
protected pingTimeout: number;
|
|
16
|
-
clientId: string;
|
|
17
|
-
isWsConnected: boolean;
|
|
18
|
-
protected responsePacketLst: SocketPacket[];
|
|
19
|
-
protected eventPacketLst: SocketPacket[];
|
|
20
|
-
protected url: string;
|
|
21
|
-
private _onEventHandler;
|
|
22
|
-
private _onResponseHandler;
|
|
23
|
-
private _onSocketConnect;
|
|
24
|
-
private _onSocketDisconnect;
|
|
25
|
-
private _onConnectHandler;
|
|
26
|
-
private _onDisconnectHandler;
|
|
27
|
-
constructor();
|
|
28
|
-
init(url: string, reconnectDelay: number, pingInterval: number, pingTimeout: number): void;
|
|
29
|
-
connect(_onSocketConnect: Action0): void;
|
|
30
|
-
close(_onSocketDisconnect: Action0): void;
|
|
31
|
-
sendRequestAuthSocket(): void;
|
|
32
|
-
send(requestType: RequestType, requestRole: RequestRole, operationRequest: OperationRequest, authToken: string, secretKey: string, customTags: GNHashtable): void;
|
|
33
|
-
protected emit(requestType: RequestType, requestRole: RequestRole, operationRequest: OperationRequest, authToken: string, secretKey: string, customTags: GNHashtable): void;
|
|
34
|
-
reInitNewSocket(): void;
|
|
35
|
-
setOnConnectHandler(_onConnectHandler: Action0): void;
|
|
36
|
-
setOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
37
|
-
removeOnConnectHandler(_onConnectHandler: Action0): void;
|
|
38
|
-
removeOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
39
|
-
onConnectHandler(): void;
|
|
40
|
-
onDisconnectHandler(): void;
|
|
41
|
-
setOnEventHandler(_onEventHandler: Action2<GNArray, boolean>): void;
|
|
42
|
-
onEventHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
43
|
-
setOnResponseHandler(_onResponseHandler: Action2<GNArray, boolean>): void;
|
|
44
|
-
onResponseHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
45
|
-
static fromMsgList(objects: any[]): any[];
|
|
46
|
-
static fromJsonList(objects: any): any[];
|
|
47
|
-
service(): void;
|
|
48
|
-
}
|
|
1
|
+
import { Action0 } from "../../common/Action0";
|
|
2
|
+
import { Action2 } from "../../common/Action2";
|
|
3
|
+
import { GNArray, GNHashtable } from "../../common/GNData";
|
|
4
|
+
import { RequestRole } from "../../constant/enumType/RequestRole";
|
|
5
|
+
import { RequestType } from "../../constant/enumType/RequestType";
|
|
6
|
+
import { OperationRequest } from "../../entity/OperationRequest";
|
|
7
|
+
export declare class SocketPacket {
|
|
8
|
+
obj: any;
|
|
9
|
+
encrypted: boolean;
|
|
10
|
+
constructor(obj: any, encrypted: boolean);
|
|
11
|
+
}
|
|
12
|
+
export declare abstract class NetworkingSocketPeerBase {
|
|
13
|
+
protected reconnectDelay: number;
|
|
14
|
+
protected pingInterval: number;
|
|
15
|
+
protected pingTimeout: number;
|
|
16
|
+
clientId: string;
|
|
17
|
+
isWsConnected: boolean;
|
|
18
|
+
protected responsePacketLst: SocketPacket[];
|
|
19
|
+
protected eventPacketLst: SocketPacket[];
|
|
20
|
+
protected url: string;
|
|
21
|
+
private _onEventHandler;
|
|
22
|
+
private _onResponseHandler;
|
|
23
|
+
private _onSocketConnect;
|
|
24
|
+
private _onSocketDisconnect;
|
|
25
|
+
private _onConnectHandler;
|
|
26
|
+
private _onDisconnectHandler;
|
|
27
|
+
constructor();
|
|
28
|
+
init(url: string, reconnectDelay: number, pingInterval: number, pingTimeout: number): void;
|
|
29
|
+
connect(_onSocketConnect: Action0): void;
|
|
30
|
+
close(_onSocketDisconnect: Action0): void;
|
|
31
|
+
sendRequestAuthSocket(): void;
|
|
32
|
+
send(requestType: RequestType, requestRole: RequestRole, operationRequest: OperationRequest, authToken: string, secretKey: string, customTags: GNHashtable): void;
|
|
33
|
+
protected emit(requestType: RequestType, requestRole: RequestRole, operationRequest: OperationRequest, authToken: string, secretKey: string, customTags: GNHashtable): void;
|
|
34
|
+
reInitNewSocket(): void;
|
|
35
|
+
setOnConnectHandler(_onConnectHandler: Action0): void;
|
|
36
|
+
setOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
37
|
+
removeOnConnectHandler(_onConnectHandler: Action0): void;
|
|
38
|
+
removeOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
39
|
+
onConnectHandler(): void;
|
|
40
|
+
onDisconnectHandler(): void;
|
|
41
|
+
setOnEventHandler(_onEventHandler: Action2<GNArray, boolean>): void;
|
|
42
|
+
onEventHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
43
|
+
setOnResponseHandler(_onResponseHandler: Action2<GNArray, boolean>): void;
|
|
44
|
+
onResponseHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
45
|
+
static fromMsgList(objects: any[]): any[];
|
|
46
|
+
static fromJsonList(objects: any): any[];
|
|
47
|
+
service(): void;
|
|
48
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Action1 } from "../../common/Action1";
|
|
2
|
-
import { Action0 } from "../../common/Action0";
|
|
3
|
-
import { GNArray } from "../../common/GNData";
|
|
4
|
-
import { OperationEvent } from "../../entity/OperationEvent";
|
|
5
|
-
import { IServerEventHandler } from "../handler/IServerEventHandler";
|
|
6
|
-
import { OperationPending } from "../OperationPending";
|
|
7
|
-
import { PeerBase } from "../PeerBase";
|
|
8
|
-
export declare class SocketPeer extends PeerBase {
|
|
9
|
-
private networkingSocketPeerBase;
|
|
10
|
-
private serverEventHandlersDict;
|
|
11
|
-
private _onEventHandler;
|
|
12
|
-
getClientId(): string;
|
|
13
|
-
isConnected(): boolean;
|
|
14
|
-
sendRequestAuthSocket(): void;
|
|
15
|
-
private subscriberServerEventHandler;
|
|
16
|
-
subscriberAServerEventHandler(serverEventHandler: IServerEventHandler): void;
|
|
17
|
-
initGNSocketObject(): void;
|
|
18
|
-
setOnConnectHandler(_onConnectHandler: Action0): void;
|
|
19
|
-
setOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
20
|
-
removeOnConnectHandler(_onConnectHandler: Action0): void;
|
|
21
|
-
removeOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
22
|
-
connect(_onSocketConnect: Action0): void;
|
|
23
|
-
disconnect(_onSocketDisconnect: Action0): void;
|
|
24
|
-
setOnEventHandler(_onEventHandler: Action1<OperationEvent>): void;
|
|
25
|
-
send(operationPending: OperationPending): void;
|
|
26
|
-
onEventHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
27
|
-
service(): void;
|
|
28
|
-
}
|
|
1
|
+
import { Action1 } from "../../common/Action1";
|
|
2
|
+
import { Action0 } from "../../common/Action0";
|
|
3
|
+
import { GNArray } from "../../common/GNData";
|
|
4
|
+
import { OperationEvent } from "../../entity/OperationEvent";
|
|
5
|
+
import { IServerEventHandler } from "../handler/IServerEventHandler";
|
|
6
|
+
import { OperationPending } from "../OperationPending";
|
|
7
|
+
import { PeerBase } from "../PeerBase";
|
|
8
|
+
export declare class SocketPeer extends PeerBase {
|
|
9
|
+
private networkingSocketPeerBase;
|
|
10
|
+
private serverEventHandlersDict;
|
|
11
|
+
private _onEventHandler;
|
|
12
|
+
getClientId(): string;
|
|
13
|
+
isConnected(): boolean;
|
|
14
|
+
sendRequestAuthSocket(): void;
|
|
15
|
+
private subscriberServerEventHandler;
|
|
16
|
+
subscriberAServerEventHandler(serverEventHandler: IServerEventHandler): void;
|
|
17
|
+
initGNSocketObject(): void;
|
|
18
|
+
setOnConnectHandler(_onConnectHandler: Action0): void;
|
|
19
|
+
setOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
20
|
+
removeOnConnectHandler(_onConnectHandler: Action0): void;
|
|
21
|
+
removeOnDisconnectHandler(_onDisconnectHandler: Action0): void;
|
|
22
|
+
connect(_onSocketConnect: Action0): void;
|
|
23
|
+
disconnect(_onSocketDisconnect: Action0): void;
|
|
24
|
+
setOnEventHandler(_onEventHandler: Action1<OperationEvent>): void;
|
|
25
|
+
send(operationPending: OperationPending): void;
|
|
26
|
+
onEventHandler(obj: GNArray, isEncrypted: boolean): void;
|
|
27
|
+
service(): void;
|
|
28
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NetworkingPeer } from "../networking/NetworkingPeer";
|
|
2
|
-
export declare class ServiceUpdate {
|
|
3
|
-
peer: NetworkingPeer;
|
|
4
|
-
run(): void;
|
|
5
|
-
private update;
|
|
6
|
-
}
|
|
1
|
+
import { NetworkingPeer } from "../networking/NetworkingPeer";
|
|
2
|
+
export declare class ServiceUpdate {
|
|
3
|
+
peer: NetworkingPeer;
|
|
4
|
+
run(): void;
|
|
5
|
+
private update;
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmobitea/gn-typescript-client",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"debug": "node index.js",
|
|
9
9
|
"test": "mocha -r ts-node/register ./test/**/*.test.ts",
|
|
10
|
-
"buildnode": "webpack --config webpack.config.js --mode production --
|
|
11
|
-
"buildudm": "webpack --config webpack.config.udm.js --mode production --
|
|
12
|
-
"
|
|
10
|
+
"buildnode": "webpack --config webpack.config.js --mode production --stats-modules",
|
|
11
|
+
"buildudm": "webpack --config webpack.config.udm.js --mode production --stats-modules",
|
|
12
|
+
"buildminudm": "webpack --config webpack.config.min.udm.js --mode production --stats-modules",
|
|
13
|
+
"build": "rm -rf ./dist && npm run buildnode && npm run buildudm && npm run buildminudm",
|
|
13
14
|
"push": "npm run build && npm run test && npm publish && git push"
|
|
14
15
|
},
|
|
15
16
|
"author": "changx.develop@gmail.com (https://xmobitea.com)",
|
|
16
17
|
"license": "ISC",
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"@types/mocha": "^
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"terser-webpack-plugin": "^
|
|
22
|
-
"ts-loader": "^
|
|
19
|
+
"@types/mocha": "^10.0.1",
|
|
20
|
+
"mocha": "^10.2.0",
|
|
21
|
+
"@types/store": "^2.0.3",
|
|
22
|
+
"terser-webpack-plugin": "^5.3.9",
|
|
23
|
+
"ts-loader": "^9.5.0",
|
|
23
24
|
"ts-node": "^10.9.1",
|
|
24
|
-
"tslib": "^2.
|
|
25
|
-
"
|
|
26
|
-
"webpack
|
|
25
|
+
"tslib": "^2.6.2",
|
|
26
|
+
"typescript": "^5.2.2",
|
|
27
|
+
"webpack": "^5.89.0",
|
|
28
|
+
"webpack-cli": "^5.1.4",
|
|
27
29
|
"webpack-node-externals": "^3.0.0"
|
|
28
30
|
},
|
|
29
31
|
"dependencies": {
|
|
30
32
|
"@msgpack/msgpack": "^2.8.0",
|
|
31
|
-
"axios": "^1.
|
|
33
|
+
"axios": "^1.5.1",
|
|
32
34
|
"reflect-metadata": "^0.1.13",
|
|
33
|
-
"socket.io-client": "^4.
|
|
35
|
+
"socket.io-client": "^4.7.2",
|
|
34
36
|
"store": "^2.0.12"
|
|
35
37
|
},
|
|
36
38
|
"directories": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.min.udm.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noUnusedLocals": false,
|
|
5
|
+
"noUnusedParameters": false,
|
|
6
|
+
"rootDir": "./src",
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"lib": [
|
|
9
|
+
"DOM"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"exclude": ["./test/", "./node_modules/", "./webpack.config.udm.js", "./webpack.config.min.udm.js", "./webpack.config.js", "./dist/index.js", "./dist/gn.js.client.min.js", "./dist/gn.js.client.js", "./index.js"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const TerserPlugin = require("terser-webpack-plugin");
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
entry: "./src/index.ts",
|
|
6
|
+
module: {
|
|
7
|
+
rules: [
|
|
8
|
+
{
|
|
9
|
+
test: /\.ts$/,
|
|
10
|
+
loader: "ts-loader",
|
|
11
|
+
options: {
|
|
12
|
+
configFile: "tsconfig-build.min.udm.json",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
resolve: {
|
|
18
|
+
extensions: [".ts", ".tsx", ".js", ".jsx"],
|
|
19
|
+
fallback: {
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
output: {
|
|
24
|
+
filename: "gn.js.client.min.js",
|
|
25
|
+
path: path.resolve(__dirname, "dist"),
|
|
26
|
+
library: {
|
|
27
|
+
type: "umd",
|
|
28
|
+
name: "GN",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
optimization: {
|
|
32
|
+
minimize: true,
|
|
33
|
+
minimizer: [
|
|
34
|
+
new TerserPlugin({
|
|
35
|
+
terserOptions: {
|
|
36
|
+
compress: {
|
|
37
|
+
keep_fnames: true,
|
|
38
|
+
keep_classnames: true,
|
|
39
|
+
},
|
|
40
|
+
mangle: {
|
|
41
|
+
keep_fnames: true,
|
|
42
|
+
keep_classnames: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
};
|