Skip to content

Commit ebb336a

Browse files
committed
add webpack alias for build
1 parent a09e929 commit ebb336a

File tree

9 files changed

+1298
-514
lines changed

9 files changed

+1298
-514
lines changed

client/packages/common/src/hooks/useNativeClient/useNativeClient.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import { uniqWith } from 'lodash';
21
import { useState, useEffect } from 'react';
2+
import { useMutation } from 'react-query';
3+
import { uniqWith } from 'lodash';
4+
import { useNavigate } from '@openmsupply-client/common';
35
import { KeepAwake } from '@capacitor-community/keep-awake';
6+
import { Capacitor } from '@capacitor/core';
7+
import { App } from '@capacitor/app';
48
import {
59
getNativeAPI,
610
getPreference,
@@ -17,10 +21,6 @@ import {
1721
NativeAPI,
1822
NativeMode,
1923
} from './types';
20-
import { Capacitor } from '@capacitor/core';
21-
import { App } from '@capacitor/app';
22-
import { useMutation } from 'react-query';
23-
import { useNavigate } from 'react-router-dom';
2424
import { useAuthContext } from '../../authentication';
2525

2626
declare global {

client/packages/electron/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@openmsupply-client/electron",
33
"productName": "open mSupply",
44
"//": "Version is updated from the root package.json when electron is built, see the 'make' script below",
5-
"version": "1.1.16",
5+
"version": "1.2.00",
66
"description": "Client for omSupply running on local network",
77
"main": "./.webpack/main",
88
"scripts": {

client/packages/electron/webpack.main.config.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Configuration } from 'webpack';
33
import { rules } from './webpack.rules';
44

55
// eslint-disable-next-line @typescript-eslint/no-var-requires
6-
const path = require('path');
6+
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
77

88
export const mainConfig: Configuration = {
99
/**
@@ -17,8 +17,6 @@ export const mainConfig: Configuration = {
1717
},
1818
resolve: {
1919
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
20-
alias: {
21-
'@common/utils': path.resolve(__dirname, '../common/src/utils'),
22-
},
20+
plugins: [new TsconfigPathsPlugin()], // creates alias entries for the paths in tsconfig.json
2321
},
2422
};

client/packages/host/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"history": "^5.1.0",
3838
"react": "^18.0.0",
3939
"react-dom": "^18.0.0",
40-
"react-router-dom": "^6.0.2",
4140
"swc-loader": "^0.2.0",
4241
"webpack-bundle-analyzer": "^4.4.2"
4342
},

client/packages/host/src/components/AuthenticationAlert.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { AppRoute } from '@openmsupply-client/config';
33
import React, { useEffect } from 'react';
44
import {
55
AuthError,
6-
matchPath,
76
Location,
87
RouteBuilder,
8+
matchPath,
99
useLocalStorage,
1010
useLocation,
1111
useNavigate,

client/packages/requisitions/src/RequestRequisition/api/operations.generated.ts

+1,285-498
Large diffs are not rendered by default.

client/packages/system/src/Patient/ListView/ListView.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { FC } from 'react';
2-
import { useNavigate } from 'react-router-dom';
32
import {
43
TableProvider,
54
DataTable,
@@ -12,6 +11,7 @@ import {
1211
ReadOnlyCheckboxCell,
1312
ColumnDataAccessor,
1413
useAuthContext,
14+
useNavigate,
1515
ColumnDescription,
1616
} from '@openmsupply-client/common';
1717
import { usePatient, PatientRowFragment } from '../api';

client/packages/system/src/Sync/api/operations.generated.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as Types from '@openmsupply-client/common';
22

33
import { GraphQLClient } from 'graphql-request';
4-
import * as Dom from 'graphql-request/src/types.dom';
4+
import * as Dom from 'graphql-request/dist/types.dom';
55
import gql from 'graphql-tag';
66
import { graphql, ResponseResolver, GraphQLRequest, GraphQLContext } from 'msw'
77
export type SyncSettingsFragment = { __typename: 'SyncSettingsNode', intervalSeconds: number, url: string, username: string };

client/yarn.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -14933,7 +14933,7 @@ react-resize-detector@^8.0.4:
1493314933
dependencies:
1493414934
lodash "^4.17.21"
1493514935

14936-
react-router-dom@^6.0.2, react-router-dom@^6.1.1:
14936+
react-router-dom@^6.1.1:
1493714937
version "6.14.2"
1493814938
resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.14.2.tgz#88f520118b91aa60233bd08dbd3fdcaea3a68488"
1493914939
integrity sha512-5pWX0jdKR48XFZBuJqHosX3AAHjRAzygouMTyimnBPOLdY3WjzUSKhus2FVMihUFWzeLebDgr4r8UeQFAct7Bg==
@@ -16866,7 +16866,7 @@ ts-log@^2.2.3:
1686616866
resolved "https://registry.yarnpkg.com/ts-log/-/ts-log-2.2.5.tgz#aef3252f1143d11047e2cb6f7cfaac7408d96623"
1686716867
integrity sha512-PGcnJoTBnVGy6yYNFxWVNkdcAuAMstvutN9MgDJIV6L0oG8fB+ZNNy1T+wJzah8RPGor1mZuPQkVfXNDpy9eHA==
1686816868

16869-
tsconfig-paths-webpack-plugin@^4.0.1:
16869+
tsconfig-paths-webpack-plugin@4.1.0, tsconfig-paths-webpack-plugin@^4.0.1:
1687016870
version "4.1.0"
1687116871
resolved "https://registry.yarnpkg.com/tsconfig-paths-webpack-plugin/-/tsconfig-paths-webpack-plugin-4.1.0.tgz#3c6892c5e7319c146eee1e7302ed9e6f2be4f763"
1687216872
integrity sha512-xWFISjviPydmtmgeUAuXp4N1fky+VCtfhOkDUFIv5ea7p4wuTomI4QTrXvFBX2S4jZsmyTSrStQl+E+4w+RzxA==

0 commit comments

Comments
 (0)