Commit 407e9b6
authored
@ascorbic Is Impala still maintained? I happened to have some small
projects that `@impala/preact` just perfectly fit the need.
I noticed that `preact-render-to-string` is being included in the client
bundle, which is weird. I dug around and noticed that this is used in
the `HeadContext`'s `getAsString` method, which is not being used at
all:
https://github.com/search?q=repo%3Aascorbic%2Fimpala%20getAsString&type=code
I guess the `getAsString` was added for SSR, but later the SSR for
`<head />` has been moved to `entry-server` instead, which made
`getAsString` obsolete:
- preact
-
https://github.com/ascorbic/impala/blob/74a4ab04744e8a539a3a7ec1225753c36ac040df/packages/preact/src/entry-server.tsx#L25
- react
-
https://github.com/ascorbic/impala/blob/74a4ab04744e8a539a3a7ec1225753c36ac040df/packages/react/src/entry-server.tsx#L60
The PR removes the `getAsString` method from `HeadContext`, preventing
`preact-render-to-string` and `react-dom/server` from being included in
the client bundle (they should only be in the server bundle).
1 parent 74a4ab0 commit 407e9b6
File tree
2 files changed
+0
-10
lines changed- packages
- preact/src
- react/src
2 files changed
+0
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | 2 | | |
4 | 3 | | |
5 | 4 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 32 | | |
38 | 33 | | |
39 | 34 | | |
| |||
0 commit comments