Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shiny-singers-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"uploadthing": patch
---

Fixed withUt to work in monorepos
5 changes: 4 additions & 1 deletion packages/uploadthing/src/tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const PACKAGES = ["react", "solid", "svelte", "vue"];
export function withUt(twConfig: Config) {
const contentPaths = PACKAGES.map((pkg) => {
try {
const resolved = require.resolve(`@uploadthing/${pkg}`);
const resolved = require.resolve(`@uploadthing/${pkg}`, {
paths: [...module.paths, process.cwd()],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, I probably would have spent quite some time to think of trying this xd

});

return resolved.split(sep).slice(0, -1).join(sep) + `${sep}**`;
} catch {
return null;
Expand Down