-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing Multi-threading #487
base: main
Are you sure you want to change the base?
Conversation
packages/fastify-renderer/src/node/renderers/react/ReactRenderer.tsx
Outdated
Show resolved
Hide resolved
packages/fastify-renderer/src/node/renderers/react/ReactRenderer.tsx
Outdated
Show resolved
Hide resolved
packages/fastify-renderer/src/node/renderers/react/ReactRenderer.tsx
Outdated
Show resolved
Hide resolved
I'm updating most dev dependencies to make the linter accept |
transpileOnly: true, | ||
}) | ||
require(tsWorkerPath) | ||
} catch { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this catch is going to catch any errors importing the actual target file, like syntax errors or runtime issues. Could we drive the decision to use ts-node or not with an environment variable or some other explicit instruction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think magic flags should be avoided imo, especially given that it only matters in development of this package itself.
.ts
files will never appear in the built package, which will make this always throw when distributed, and always load the js file instead.
It's safe in that respect.
I can do it based on the existence of a .ts
file instead. Would that be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@airhorns Actually this can be handled really nicely via vite, but I can't do that right now because the test app doesn't use vite. It could be a small project for later if you like.
Introducing multi-threading to off-load React SSR to work threads.
TransformAll hooks are no longer a function, but a path to import a function to useI will leave comments on the diff discussing every important part for easier reviewing
Todos: