Skip to content
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

FIX tailwindcss standalone build on monorepos #694

Merged
merged 2 commits into from
Dec 23, 2024

Conversation

AlbertSabate
Copy link
Collaborator

This fixes the standalone build for tailwindcss when used on a monorepo, prevents having broken symlinks from the folder ".bin".

Copy link

pkg-pr-new bot commented Dec 23, 2024

Open in Stackblitz

brisa-adapter-vercel

npm i https://pkg.pr.new/brisa-build/brisa/brisa-adapter-vercel@694

brisa-pandacss

npm i https://pkg.pr.new/brisa-build/brisa/brisa-pandacss@694

brisa

npm i https://pkg.pr.new/brisa-build/brisa@694

brisa-tailwindcss

npm i https://pkg.pr.new/brisa-build/brisa/brisa-tailwindcss@694

create-brisa

npm i https://pkg.pr.new/brisa-build/brisa/create-brisa@694

www

npm i https://pkg.pr.new/brisa-build/brisa/www@694

commit: dcceba9

Copy link
Collaborator

@aralroca aralroca left a comment

Choose a reason for hiding this comment

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

I wonder if instead of:

  • Copy
  • Detect and if it exists .bin delete it

Could we directly just copy if from does not contain node_modules/.bin?

It would also be nice to add the tests for this change.

@AlbertSabate
Copy link
Collaborator Author

How the logic is now no. Reason is because we are copying the whole path recursively, so we don't have information about the inner folder. And we need to copy the dependency.
A solution it will be to copy file by file and then ignore .bin folders, but it will be a more complicated logic to read and not sure the benefit is substantiable enough

@AlbertSabate
Copy link
Collaborator Author

I will have no issues doing how you say, but I don't see too much benefit.

I'll add a test, do not merge yet.

@aralroca
Copy link
Collaborator

I will have no issues doing how you say, but I don't see too much benefit.

I'll add a test, do not merge yet.

Less work... Copy + detect + delete are 3 operations, detect and avoid copy would be 1.

@aralroca aralroca merged commit c123384 into canary Dec 23, 2024
5 of 11 checks passed
@aralroca aralroca deleted the fix/tailwind-broken-symlinks branch December 23, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants