Skip to content

Commit c27bd7f

Browse files
authoredApr 30, 2024··
[AC-1971]: Use git submodule for uikit-react to reduce the bundle size (#180)
### Key Changes: - Removed the `@sendbird/uikit-react` dependency from `package.json`. - Linked the necessary code from [sendbird/uikit-react](https://github.com/sendbird/sendbird-uikit-react) directly into the `packages/uikit/` dir through a Git submodule. <- See `.gitmodules` file - Updated our build process(Github workflow / Circleci config) to initialize and update the Git submodule, ensuring that the latest version of the code is always used.
1 parent 0319f55 commit c27bd7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+38909
-4230
lines changed
 

‎.eslintrc.cjs

+29-26
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,40 @@ module.exports = {
22
root: true, // This fixes issue when running lint fix command: https://stackoverflow.com/questions/55060228/eslint-couldnt-find-the-plugin-eslint-plugin-typescript-eslint
33
env: { browser: true, es2020: true },
44
parser: '@typescript-eslint/parser',
5-
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
5+
parserOptions: {
6+
ecmaVersion: 'latest',
7+
sourceType: 'module',
8+
ecmaFeatures: { jsx: true },
9+
},
610
plugins: ['import', 'styled-components-a11y'],
711
extends: [
812
'eslint:recommended',
913
'plugin:@typescript-eslint/recommended',
1014
'plugin:react/recommended',
1115
'plugin:react-hooks/recommended',
1216
'plugin:jsx-a11y/recommended',
13-
'plugin:import/errors',
14-
'plugin:import/warnings',
1517
'plugin:import/recommended',
16-
'plugin:prettier/recommended'
18+
'plugin:prettier/recommended',
1719
],
1820
rules: {
1921
'react-hooks/rules-of-hooks': 'error',
2022
'react-hooks/exhaustive-deps': 'off',
21-
// suppress errors for missing 'import React' in files
23+
// suppress errors for missing 'import React' in files
2224
'react/react-in-jsx-scope': 'off',
2325
'@typescript-eslint/no-explicit-any': 'off',
24-
"prettier/prettier": ["error", { "singleQuote": true }],
25-
"import/order": [
26-
"error",
26+
'prettier/prettier': ['error', { singleQuote: true }],
27+
'import/order': [
28+
'error',
2729
{
28-
"groups": [
29-
["builtin"],
30-
["external"],
31-
"internal",
32-
["parent", "sibling", "index"]
30+
groups: [
31+
['builtin'],
32+
['external'],
33+
'internal',
34+
['parent', 'sibling', 'index'],
3335
],
34-
"newlines-between": "always",
35-
"alphabetize": {"order": "asc", "caseInsensitive": true}
36-
}
36+
'newlines-between': 'always',
37+
alphabetize: { order: 'asc', caseInsensitive: true },
38+
},
3739
],
3840
'styled-components-a11y/control-has-associated-label': [
3941
2,
@@ -50,18 +52,19 @@ module.exports = {
5052
},
5153
settings: {
5254
react: {
53-
version: 'detect'
55+
version: 'detect',
5456
},
5557
'import/resolver': {
56-
node: {
58+
typescript:{},
59+
node:{
5760
extensions: [
58-
".js",
59-
".jsx",
60-
".ts",
61-
".tsx",
62-
".d.ts"
63-
]
61+
'.js',
62+
'.jsx',
63+
'.ts',
64+
'.tsx',
65+
'.d.ts',
66+
],
6467
}
65-
}
68+
},
6669
},
67-
}
70+
};

‎.github/workflows/gh-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
- name: Install and Build 🔧
1818
run: |
19-
npm install
19+
npm run install:deps
2020
cp .env .env.production
2121
echo "VITE_CHAT_AI_WIDGET_KEY=${{ secrets.chat_ai_widget_key }}" >> .env.production
2222
npm run build:pages

0 commit comments

Comments
 (0)
Please sign in to comment.