Commit e29493b
chore: streamline build pipeline (GetStream#2325)
Our build pipeline contained some quirks and the remains of previous
setups. It was time to clean it up :)
The main changes are:
**No rollup.** Previously our build pipeline was implemented in rollup.
To simplify things up, we now just run a couple of processes in
parallel: tsc to build our normal distribution and type declarations,
esbuild to build bundles, and a shell script to include assets in the
distribution.
For development, just `tsc --watch` is enough.
**No babel.** Previously our rollup config included babel transpilation
with babel-preset-env. That means we included babel-runtime in our
distribution, and transpiled async functions into generators with the
notorious `regenerator-runtime`.
Babel is now excluded from the build process (but still used as a parser
for JS files in eslint). Targeting ES2020 in tsc and esbuild should be
enough. And we finally have regular async functions in our distribution
:)
**Esbuild for bundles.** We now use esbuild instead of rollup for
creating a CJS bundles. And we no longer create UDM browser bundles.
**TS5.** I used this opportunity to bump TypeScript version as well :)
Also, removed webpack and postcss dependencies - they were not used at
all.
1. Bump prettier, eslint and eslint plugin versions. Will result in *a
lot* of warnings, but good for future-proofing.
2. Review our eslintrc, it's currently a bit of a mess.
3. Remove babel completely, use typescript-eslint instead.
4. Switch to `"module": "NodeNext"` in tsconfig. This is the new
recommended option for libraries, but will require us to add extensions
to all of our import statements, to make them fully qualified.
5. (breaking change) With `"module": "NodeNext"` we will be ready to add
`"type": "module"` in our package.json. We can't do that now, because
fully specified import statements are expected from module packages.
6. (breaking change) Drop all bundles. CJS bundle is kinda weird anyway.
Browser bundle can be replaced by `<script type="module">`.
---------
Co-authored-by: Anton Arnautov <arnautov.anton@gmail.com>1 parent d9442d2 commit e29493b
File tree
29 files changed
+8621
-10685
lines changed- .github/workflows
- e2e
- examples
- capacitor
- typescript
- vite
- scripts
- src
- components
- AutoCompleteTextarea
- Gallery/__tests__/__snapshots__
- LoadMore/__tests__
- Loading/__tests__/__snapshots__
- MessageActions/__tests__
- MessageList/__tests__/__snapshots__
- Message/renderText/__tests__/__snapshots__
29 files changed
+8621
-10685
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | | - | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments