brisa-build / brisa

The Web Platform Framework.
https://brisa.build
MIT License
449 stars 12 forks source link

fix(build): fix tailwind external subdependencies during standalone build #638

Closed aralroca closed 5 days ago

aralroca commented 6 days ago

Fixes https://github.com/brisa-build/brisa/issues/637

Fixes integration with tailwind and standalone build. The problem with tailwind is that it uses a subdependency called lightningcss which cannot be compiled, so it is marked as external. By marking it as external, if the standalone build is moved into another environment like .vercel, it stopped working. Now even if it is external, the Tailwind dependencies are added in an embedded way during the build (the responsible is the adapter). In this way the bug is solved, although on the other hand it increases the build time a little in the case of using Tailwind.

pkg-pr-new[bot] commented 6 days ago

Open in Stackblitz

brisa-adapter-vercel

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-adapter-vercel@638 ```

brisa-tailwindcss

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-tailwindcss@638 ```

brisa-pandacss

``` bun add https://pkg.pr.new/brisa-build/brisa/brisa-pandacss@638 ```

create-brisa

``` bun add https://pkg.pr.new/brisa-build/brisa/create-brisa@638 ```

www

``` bun add https://pkg.pr.new/brisa-build/brisa/www@638 ```

brisa

``` bun add https://pkg.pr.new/brisa-build/brisa@638 ```

commit: 79cdd0f