Optimize dependencies for what is actually used in a production build#82
Open
ferm10n wants to merge 2 commits into
Open
Optimize dependencies for what is actually used in a production build#82ferm10n wants to merge 2 commits into
ferm10n wants to merge 2 commits into
Conversation
all moved packages are just used in the `react-app`
- `node:path` is used instead of `path` - `node:url` is used instead of `url`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I discovered there's a few packages being included with trpc-ui that don't need to exist in a production environment. These are either unused by the project, or only used in the
react-app.I started looking at it because trpc-ui is one of the only packages I have to externalize from my build since it does this:
trpc-ui/packages/trpc-ui/src/render.ts
Line 26 in 8153d95
which doesn't work when it's in a bundle because everything ends up with the same
import.meta.url(the bundle output .js). I'm not sure if/how this separate issue should be approached. including the react app bundle in js so it can be re-bundled feels wrong but I'm in uncharted territory there lol. Maybe this could become recognized somewhere as a known issue?