apenft-js-tron 1.0.0

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.
Files changed (55) hide show
  1. package/README.md +1141 -0
  2. package/babel.config.js +4 -0
  3. package/dist/bundle.js +2 -0
  4. package/dist/bundle.js.LICENSE.txt +28 -0
  5. package/dist/index.d.ts +9 -0
  6. package/dist/src/config.d.ts +57 -0
  7. package/dist/src/queryAPI/graphql/accountApi.d.ts +11 -0
  8. package/dist/src/queryAPI/graphql/assetApi.d.ts +13 -0
  9. package/dist/src/queryAPI/graphql/base.d.ts +37 -0
  10. package/dist/src/queryAPI/graphql/collectionApi.d.ts +10 -0
  11. package/dist/src/queryAPI/graphql/gql/account.d.ts +6 -0
  12. package/dist/src/queryAPI/graphql/gql/asset.d.ts +8 -0
  13. package/dist/src/queryAPI/graphql/gql/collection.d.ts +5 -0
  14. package/dist/src/queryAPI/graphql/gql/fragments.d.ts +8 -0
  15. package/dist/src/queryAPI/graphql/index.d.ts +9 -0
  16. package/dist/src/queryAPI/index.d.ts +45 -0
  17. package/dist/src/queryAPI/restful/base.d.ts +50 -0
  18. package/dist/src/queryAPI/restful/index.d.ts +1 -0
  19. package/dist/src/queryAPI/restful/queryAPI.d.ts +26 -0
  20. package/dist/src/schemas/common/ERC1155/index.d.ts +7 -0
  21. package/dist/src/schemas/common/ERC20/index.d.ts +6 -0
  22. package/dist/src/schemas/common/ERC721/index.d.ts +5 -0
  23. package/dist/src/schemas/common/Element/exchange.d.ts +9 -0
  24. package/dist/src/schemas/common/Element/registry.d.ts +4 -0
  25. package/dist/src/schemas/common/ens.d.ts +7 -0
  26. package/dist/src/schemas/index.d.ts +18 -0
  27. package/dist/src/schemas/schemasFunctions.d.ts +24 -0
  28. package/dist/src/schemas/shasta/index.d.ts +1 -0
  29. package/dist/src/schemas/tron/index.d.ts +1 -0
  30. package/dist/src/tokens/index.d.ts +4 -0
  31. package/dist/src/tokens/shasta/index.d.ts +1 -0
  32. package/dist/src/tokens/tron/index.d.ts +1 -0
  33. package/dist/src/tradeAPI/account.d.ts +33 -0
  34. package/dist/src/tradeAPI/approve.d.ts +3 -0
  35. package/dist/src/tradeAPI/base.d.ts +40 -0
  36. package/dist/src/tradeAPI/contractSchemas.d.ts +28 -0
  37. package/dist/src/tradeAPI/contracts.d.ts +29 -0
  38. package/dist/src/tradeAPI/index.d.ts +25 -0
  39. package/dist/src/tradeAPI/nft.d.ts +42 -0
  40. package/dist/src/tradeAPI/orders.d.ts +69 -0
  41. package/dist/src/tradeAPI/ordersApi.d.ts +54 -0
  42. package/dist/src/utils/Abi.d.ts +18 -0
  43. package/dist/src/utils/PromiEvent.d.ts +21 -0
  44. package/dist/src/utils/check.d.ts +25 -0
  45. package/dist/src/utils/constants.d.ts +22 -0
  46. package/dist/src/utils/error.d.ts +20 -0
  47. package/dist/src/utils/fees.d.ts +40 -0
  48. package/dist/src/utils/helper.d.ts +23 -0
  49. package/dist/src/utils/makeOrder.d.ts +80 -0
  50. package/dist/src/utils/types.d.ts +464 -0
  51. package/dist/src/utils/utils.d.ts +1 -0
  52. package/index.ts +15 -0
  53. package/package.json +58 -0
  54. package/tsconfig.json +18 -0
  55. package/webpack.config.js +33 -0
@@ -0,0 +1,464 @@
1
+ import TronWeb from "tronweb";
2
+ import { BigNumber } from './constants';
3
+ export { TronWeb };
4
+ export declare enum Network {
5
+ Tron = "tron",
6
+ Shasta = "shasta"
7
+ }
8
+ export declare enum MakeOrderType {
9
+ FixPriceOrder = "FixPriceOrder",
10
+ DutchAuctionOrder = "DutchAuctionOrder",
11
+ EnglishAuctionOrder = "EnglishAuctionOrder",
12
+ LowerPriceOrder = "LowerPriceOrder",
13
+ MakeOfferOrder = "MakeOfferOrder",
14
+ EnglishAuctionBiddingOrder = "EnglishAuctionBiddingOrder"
15
+ }
16
+ export interface APIConfig {
17
+ networkName: Network;
18
+ account?: string;
19
+ apiBaseUrl?: string;
20
+ }
21
+ export declare enum APENFTSchemaName {
22
+ ERC20 = "ERC20",
23
+ ERC721 = "ERC721",
24
+ ERC1155 = "ERC1155"
25
+ }
26
+ export declare enum TokenStandardVersion {
27
+ Unsupported = "unsupported",
28
+ Locked = "locked",
29
+ Enjin = "1155-1.0",
30
+ ERC721v1 = "1.0",
31
+ ERC721v2 = "2.0",
32
+ ERC721v3 = "3.0"
33
+ }
34
+ export interface Asset {
35
+ tokenId: string | undefined;
36
+ tokenAddress: string;
37
+ schemaName: APENFTSchemaName;
38
+ version?: TokenStandardVersion;
39
+ name?: string;
40
+ data?: string;
41
+ decimals?: number;
42
+ collection?: APENFTCollection;
43
+ }
44
+ export interface Token {
45
+ name?: string;
46
+ symbol: string;
47
+ icon?: string;
48
+ decimals: number;
49
+ decimal?: number;
50
+ address: string;
51
+ }
52
+ export interface APENFTFungibleToken extends Token {
53
+ imageUrl?: string;
54
+ ethPrice?: string;
55
+ usdPrice?: string;
56
+ }
57
+ export interface APENFTFees {
58
+ APENFTSellerFeeBasisPoints?: number;
59
+ APENFTBuyerFeeBasisPoints?: number;
60
+ devSellerFeeBasisPoints?: number;
61
+ devBuyerFeeBasisPoints?: number;
62
+ buyerProtocolFeeBasisPoints: number;
63
+ sellerProtocolFeeBasisPoints: number;
64
+ }
65
+ export interface ComputedFees extends APENFTFees {
66
+ totalBuyerFeeBasisPoints: number;
67
+ totalSellerFeeBasisPoints: number;
68
+ transferFee?: BigNumber | string | null;
69
+ transferFeeTokenAddress?: string | null;
70
+ sellerBountyBasisPoints?: number;
71
+ }
72
+ export interface APENFTCollection extends APENFTFees {
73
+ name?: string;
74
+ description?: string;
75
+ imageUrl?: string;
76
+ transferFee?: BigNumber | string | null;
77
+ transferFeeAddress?: string;
78
+ transferFeePaymentToken?: APENFTFungibleToken | null;
79
+ }
80
+ export interface TradeBestAskType {
81
+ bestAskSaleKind: number;
82
+ bestAskPrice: number;
83
+ bestAskToken: string;
84
+ bestAskPriceBase: number;
85
+ bestAskPriceUSD: number;
86
+ bestAskListingDate: string;
87
+ bestAskExpirationDate: string;
88
+ bestAskPriceCNY: number;
89
+ bestAskCreatedDate: string;
90
+ bestAskOrderString: string;
91
+ bestAskOrderType: number;
92
+ bestAskOrderQuantity: number;
93
+ bestAskTokenContract: Token;
94
+ }
95
+ export interface CreateOrderParams {
96
+ asset: Asset;
97
+ startAmount: number;
98
+ quantity?: number;
99
+ paymentToken?: Token;
100
+ }
101
+ export interface SellOrderParams extends CreateOrderParams {
102
+ listingTime?: number;
103
+ expirationTime?: number;
104
+ endAmount?: number;
105
+ buyerAddress?: string;
106
+ }
107
+ export interface EnglishAuctionOrderParams extends CreateOrderParams {
108
+ expirationTime: number;
109
+ englishAuctionReservePrice?: number;
110
+ }
111
+ export interface BuyOrderParams extends CreateOrderParams {
112
+ expirationTime: number;
113
+ }
114
+ export interface BiddingOrderParams extends CreateOrderParams {
115
+ bestAsk: TradeBestAskType;
116
+ }
117
+ interface APENFTNFTAsset {
118
+ id?: string;
119
+ address: string;
120
+ quantity?: string;
121
+ data?: string;
122
+ collection?: APENFTCollection;
123
+ }
124
+ export type APENFTAsset = APENFTNFTAsset;
125
+ export interface ExchangeMetadataForAsset {
126
+ asset: APENFTNFTAsset;
127
+ schema: APENFTSchemaName;
128
+ version?: number;
129
+ referrerAddress?: string;
130
+ }
131
+ export type ExchangeMetadata = ExchangeMetadataForAsset;
132
+ export interface ECSignature {
133
+ v: number;
134
+ r: string;
135
+ s: string;
136
+ }
137
+ export interface OrderJSON extends Partial<ECSignature> {
138
+ exchange: string;
139
+ maker: string;
140
+ taker: string;
141
+ makerRelayerFee: string;
142
+ takerRelayerFee: string;
143
+ makerProtocolFee: string;
144
+ takerProtocolFee: string;
145
+ makerReferrerFee: string;
146
+ feeRecipient: string;
147
+ feeMethod: number;
148
+ side: number;
149
+ saleKind: number;
150
+ target: string;
151
+ howToCall: number;
152
+ dataToCall: string;
153
+ replacementPattern: string;
154
+ staticTarget: string;
155
+ staticExtradata: string;
156
+ paymentToken: string;
157
+ quantity: string;
158
+ basePrice: string;
159
+ englishAuctionReservePrice: string | undefined;
160
+ extra: string;
161
+ listingTime: number | string;
162
+ expirationTime: number | string;
163
+ salt: string;
164
+ metadata: ExchangeMetadata;
165
+ hash: string;
166
+ orderHash?: string;
167
+ chain?: string;
168
+ chainId?: string;
169
+ }
170
+ export interface APENFTOrder {
171
+ exchange: string;
172
+ maker: string;
173
+ taker: string;
174
+ makerRelayerFee: BigNumber;
175
+ takerRelayerFee: BigNumber;
176
+ makerProtocolFee: BigNumber;
177
+ takerProtocolFee: BigNumber;
178
+ feeRecipient: string;
179
+ feeMethod: number;
180
+ side: number;
181
+ saleKind: number;
182
+ target: string;
183
+ howToCall: number;
184
+ dataToCall: string;
185
+ replacementPattern: string;
186
+ staticTarget: string;
187
+ staticExtradata: string;
188
+ paymentToken: string;
189
+ basePrice: BigNumber;
190
+ extra: BigNumber;
191
+ listingTime: BigNumber;
192
+ expirationTime: BigNumber;
193
+ salt: BigNumber;
194
+ }
195
+ export interface UnsignedOrder extends UnhashedOrder {
196
+ hash: string;
197
+ }
198
+ export interface UnhashedOrder extends APENFTOrder {
199
+ feeMethod: FeeMethod;
200
+ side: OrderSide;
201
+ saleKind: SaleKind;
202
+ howToCall: HowToCall;
203
+ quantity: BigNumber;
204
+ makerReferrerFee: BigNumber;
205
+ waitingForBestCounterOrder?: boolean;
206
+ englishAuctionReservePrice?: BigNumber;
207
+ metadata: ExchangeMetadata;
208
+ }
209
+ export interface Order extends UnsignedOrder, Partial<ECSignature> {
210
+ createdTime?: BigNumber;
211
+ currentPrice?: BigNumber;
212
+ currentBounty?: BigNumber;
213
+ makerAccount?: APENFTAccount;
214
+ takerAccount?: APENFTAccount;
215
+ paymentTokenContract?: APENFTFungibleToken;
216
+ feeRecipientAccount?: APENFTAccount;
217
+ cancelledOrFinalized?: boolean;
218
+ markedInvalid?: boolean;
219
+ asset?: any;
220
+ assetBundle?: any;
221
+ id?: any;
222
+ orderHash?: any;
223
+ }
224
+ export declare enum FeeMethod {
225
+ ProtocolFee = 0,
226
+ SplitFee = 1
227
+ }
228
+ export declare enum OrderSide {
229
+ Buy = 0,
230
+ Sell = 1
231
+ }
232
+ export declare enum OrderType {
233
+ All = -1,
234
+ Buy = 0,
235
+ Sell = 1
236
+ }
237
+ export declare enum SaleKind {
238
+ FixedPrice = 0,
239
+ DutchAuction = 1
240
+ }
241
+ export declare enum HowToCall {
242
+ Call = 0,
243
+ DelegateCall = 1,
244
+ StaticCall = 2,
245
+ Create = 3
246
+ }
247
+ export interface BuyOrderApprove {
248
+ paymentTokenApprove: {
249
+ isApprove: boolean;
250
+ func: (tokenAddress: string) => Promise<any>;
251
+ balances: string;
252
+ };
253
+ metadata: ExchangeMetadata;
254
+ }
255
+ export interface SellOrderApprove extends BuyOrderApprove {
256
+ sellAssetApprove: {
257
+ isApprove: boolean;
258
+ func: (metadata: ExchangeMetadata) => Promise<any>;
259
+ balances: string;
260
+ };
261
+ }
262
+ export interface APENFTUser {
263
+ username: string;
264
+ }
265
+ export interface APENFTAccount {
266
+ address: string;
267
+ config: string;
268
+ profileImgUrl: string;
269
+ user: APENFTUser | null;
270
+ }
271
+ export interface FunctionInput {
272
+ name: string;
273
+ type: string;
274
+ value?: any;
275
+ }
276
+ export interface AnnotatedFunctionInput {
277
+ name: string;
278
+ type: string;
279
+ kind: FunctionInputKind;
280
+ components?: Array<FunctionInput>;
281
+ value?: any;
282
+ }
283
+ export interface AnnotatedFunctionOutput {
284
+ name: string;
285
+ type: string;
286
+ kind: FunctionOutputKind;
287
+ }
288
+ export declare enum FunctionInputKind {
289
+ Replaceable = "replaceable",
290
+ Asset = "asset",
291
+ Owner = "owner",
292
+ Index = "index",
293
+ Count = "count",
294
+ Data = "data"
295
+ }
296
+ export declare enum FunctionOutputKind {
297
+ Owner = "owner",
298
+ Asset = "asset",
299
+ Count = "count",
300
+ Other = "other"
301
+ }
302
+ export declare enum StateMutability {
303
+ Pure = "pure",
304
+ View = "view",
305
+ Payable = "payable",
306
+ Nonpayable = "nonpayable"
307
+ }
308
+ export interface AnnotatedFunctionABI {
309
+ type: AbiType;
310
+ name: string;
311
+ target: string;
312
+ inputs: AnnotatedFunctionInput[];
313
+ outputs: AnnotatedFunctionOutput[];
314
+ constant: boolean;
315
+ stateMutability: StateMutability;
316
+ payable: boolean;
317
+ }
318
+ export declare enum OfferType {
319
+ Default = "default",
320
+ ContractOffer = "contract_offer"
321
+ }
322
+ export interface CollectionStat {
323
+ assets_total: number;
324
+ owners_total: number;
325
+ floor_price: number;
326
+ volume_total: number;
327
+ avg_price_24h: number;
328
+ }
329
+ export interface CollectionOwner {
330
+ address: string;
331
+ }
332
+ export declare enum AbiType {
333
+ Function = "function",
334
+ Constructor = "constructor",
335
+ Event = "event",
336
+ Fallback = "fallback"
337
+ }
338
+ export interface SingleCollectionInfo {
339
+ contract_address: string;
340
+ description: string;
341
+ discord_link: string;
342
+ facebook_link: string;
343
+ instagram_link: string;
344
+ telegram_link: string;
345
+ twitter_link: string;
346
+ website_link: string;
347
+ external_url: string;
348
+ medium_link: string;
349
+ image_original_url: string;
350
+ image_url: string;
351
+ banner_image_url: string;
352
+ is_verified: string;
353
+ in_activity: boolean;
354
+ name: string;
355
+ stat: CollectionStat;
356
+ owner: CollectionOwner;
357
+ co_operators: string[];
358
+ }
359
+ export interface AddressParams {
360
+ address: string;
361
+ }
362
+ export interface Pagination {
363
+ first: number;
364
+ cursor?: string;
365
+ }
366
+ export interface AssetDetailParams {
367
+ token_id: string;
368
+ collection: string;
369
+ }
370
+ export interface AssetListingsParams extends AssetDetailParams {
371
+ pagination?: Pagination;
372
+ is_order_ask: boolean;
373
+ }
374
+ export interface AssetTradingHistory {
375
+ pagination?: Pagination;
376
+ collections: string[];
377
+ token_id: string;
378
+ }
379
+ export declare enum AssetSortBy {
380
+ HighestLastSale = "HighestLastSale",
381
+ RecentlyListed = "RecentlyListed",
382
+ PriceLowToHigh = "PriceLowToHigh",
383
+ PriceHighToLow = "PriceHighToLow",
384
+ RecentlyTransfer = "RecentlyTransfer",
385
+ RecentlyCreated = "RecentlyCreated",
386
+ RecentlySold = "RecentlySold",
387
+ EndingSoon = "EndingSoon"
388
+ }
389
+ export interface AssetMoreParams {
390
+ pagination?: Pagination;
391
+ sort?: AssetSortBy;
392
+ collections: string[];
393
+ }
394
+ export declare enum CollectionTradeTrendFilterDays {
395
+ Days_7 = "Days_7",
396
+ Days_14 = "Days_14",
397
+ Days_30 = "Days_30",
398
+ Days_60 = "Days_60",
399
+ Days_90 = "Days_90",
400
+ Days_365 = "Days_365",
401
+ Days_All = "Days_All"
402
+ }
403
+ export interface CollectionTradeTrendParams {
404
+ days?: CollectionTradeTrendFilterDays;
405
+ collection: string;
406
+ }
407
+ export declare enum EventType {
408
+ Transfer = "Transfer",
409
+ Offer = "Offer",
410
+ Listing = "Listing",
411
+ CancelOffer = "CancelOffer",
412
+ CancelListing = "CancelListing",
413
+ Mint = "Mint",
414
+ Burn = "Burn",
415
+ Sale = "Sale"
416
+ }
417
+ export interface CollectionTradingHistoryParams {
418
+ pagination?: Pagination;
419
+ event_types: EventType[];
420
+ currencies: string[];
421
+ collections: string[];
422
+ user: string;
423
+ }
424
+ export interface HotCollectionsParams {
425
+ chain: string;
426
+ is_recommend: boolean;
427
+ }
428
+ export interface SearchParams {
429
+ pagination?: Pagination;
430
+ search: string;
431
+ }
432
+ export interface UserAssetOffersParams {
433
+ pagination?: Pagination;
434
+ user: string;
435
+ }
436
+ export interface UserAssetParams {
437
+ pagination?: Pagination;
438
+ user?: string;
439
+ sort?: AssetSortBy;
440
+ owners: string[];
441
+ }
442
+ export interface BidPriceCommonParams {
443
+ collection: string;
444
+ id: string;
445
+ currency: string;
446
+ }
447
+ export interface FixPriceOrderParams extends BidPriceCommonParams {
448
+ expirationTime: number;
449
+ buyerAddress?: string;
450
+ price: number;
451
+ }
452
+ export interface EnglishAuctionOrderParams extends BidPriceCommonParams {
453
+ expirationTime: number;
454
+ reservePrice: number;
455
+ bidPrice: number;
456
+ }
457
+ export interface EnglishAuctionBiddingOrderParams extends BidPriceCommonParams {
458
+ price: number;
459
+ }
460
+ export interface LowerPriceOrderParams {
461
+ collection: string;
462
+ id: string;
463
+ price: string;
464
+ }
@@ -0,0 +1 @@
1
+ export declare function withPrecision(value: any, precision: number | string): number | undefined;
package/index.ts ADDED
@@ -0,0 +1,15 @@
1
+ export { APENFTOrders } from './src/tradeAPI'
2
+ export { APENFTQuery } from './src/queryAPI'
3
+ export { initApprove } from './src/tradeAPI/approve'
4
+ export { Network, MakeOrderType, APENFTSchemaName, OrderSide } from './src/utils/types'
5
+ export { AssetFactory } from './src/tradeAPI/nft'
6
+ export type { APIConfig } from './src/utils/types'
7
+
8
+ // for APENFT market
9
+ export {
10
+ toBaseUnitAmount,
11
+ getSchemaList,
12
+ makeBigNumber,
13
+ } from './src/utils/helper'
14
+ export { NULL_ADDRESS } from './src/utils/constants'
15
+ export { APENFTError } from './src/utils/error'
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "apenft-js-tron",
3
+ "version": "1.0.0",
4
+ "description": "Javascript SDK for the APENFT ",
5
+ "main": "dist/index.js",
6
+ "author": "Project APENFT Developers",
7
+ "scripts": {
8
+ "dev": "tsc -w -p tsconfig.json",
9
+ "eslint": "eslint --fix src --ext .ts --max-warnings=0",
10
+ "build": "tsc",
11
+ "webpack": "webpack --mode production",
12
+ "test": "jest"
13
+ },
14
+ "dependencies": {
15
+ "@babel/core": "^7.17.5",
16
+ "@babel/preset-env": "^7.16.11",
17
+ "@babel/preset-typescript": "^7.16.7",
18
+ "@types/crypto-js": "^4.0.2",
19
+ "babel-jest": "^27.5.1",
20
+ "bignumber.js": "^9.0.1",
21
+ "crypto-js": "^4.1.1",
22
+ "dotenv": "^16.0.0",
23
+ "ethereumjs-util": "^7.1.0",
24
+ "graphql": "^15.5.1",
25
+ "graphql-request": "^3.5.0",
26
+ "isomorphic-unfetch": "^3.1.0",
27
+ "node-polyfill-webpack-plugin": "^2.0.1",
28
+ "tronweb": "^4.3.0"
29
+ },
30
+ "devDependencies": {
31
+ "@maticnetwork/maticjs": "^2.0.45",
32
+ "@types/chai": "^4.2.21",
33
+ "@types/jest": "^27.4.1",
34
+ "@types/node": "^12.12.6",
35
+ "@types/node-fetch": "^2.5.10",
36
+ "@typescript-eslint/eslint-plugin": "^4.29.2",
37
+ "@typescript-eslint/parser": "^4.29.2",
38
+ "chai": "^4.3.4",
39
+ "eslint": "^7.32.0",
40
+ "https-proxy-agent": "^5.0.0",
41
+ "jest": "^27.5.1",
42
+ "mocha": "^9.0.3",
43
+ "mocha-typescript": "^1.1.17",
44
+ "node-fetch": "^2.6.1",
45
+ "prettier": "^2.2.1",
46
+ "tronweb-typings": "^1.0.1",
47
+ "ts-loader": "^9.4.2",
48
+ "ts-node": "^9.1.1",
49
+ "typescript": "^4.9.5",
50
+ "webpack": "^5.75.0",
51
+ "webpack-cli": "^5.0.1"
52
+ },
53
+ "jest": {
54
+ "testEnvironment": "node",
55
+ "testTimeout": 1000000
56
+ },
57
+ "license": "ISC"
58
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "include": ["**/*.ts"],
3
+ "exclude": [
4
+ "node_modules"
5
+ ],
6
+ "compilerOptions": {
7
+ "outDir": "dist",
8
+ "declaration": true,
9
+ "target": "es5",
10
+ "module": "commonjs",
11
+ "resolveJsonModule": true,
12
+ "isolatedModules": true,
13
+ "strict": true,
14
+ "esModuleInterop": true,
15
+ "skipLibCheck": true,
16
+ "forceConsistentCasingInFileNames": true
17
+ }
18
+ }
@@ -0,0 +1,33 @@
1
+ const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
2
+
3
+ const path = require('path');
4
+
5
+ module.exports = {
6
+
7
+ entry: "./index.ts",
8
+
9
+ output: {
10
+ path :path.resolve(__dirname, 'dist'),
11
+ filename: "bundle.js",
12
+ libraryTarget: "commonjs2"
13
+ },
14
+
15
+ module: {
16
+ rules: [
17
+ {
18
+ test: /\.ts$/,
19
+ use: 'ts-loader',
20
+ exclude: /node_modules/
21
+ }
22
+ ]
23
+ },
24
+
25
+ resolve: {
26
+ extensions: ['.js', '.ts', '.json'],
27
+ },
28
+
29
+ plugins: [
30
+ new NodePolyfillPlugin()
31
+ ],
32
+
33
+ };