brisa-build / brisa

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

fix(file-sytem-router): fix regex to work on windows #593

Closed aralroca closed 4 weeks ago

aralroca commented 4 weeks ago

Related to https://github.com/brisa-build/brisa/issues/538

When normalizing the path in the fileSystemRouter of Brisa it was using a Regex using the path.sep, however, in Windows it was getting the duplicate separator \\\\, I have improved this regex and added the failing tests so that this does not happen anymore. After this fix, you should be able to navigate to localhost:3000/about (/about/index.tsx) and correctly resolve the route.

pkg-pr-new[bot] commented 4 weeks ago

Open in Stackblitz

brisa-adapter-vercel

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

brisa-pandacss

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

brisa-tailwindcss

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

brisa

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

create-brisa

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

www

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

commit: e5ec93e