You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all, I came accross some odd behavior from the vite compiler and wanted to raise a discussion/issue about it.
To demonstrate what I mean, let's take a simple remix project made with --template remix-run/remix/templates/vite
This project has three routes - _index.tsx, about.tsx and terms.tsx.
When we run remix vite:build we see the following output
As you can see, Vite correctly names the route module chunks after the route name.
Now let's see what happens if we use route module folders. Aka if I change them to _index/route.tsx, about/route.tsx and terms/route.tsx.
Again, running remix vite:build we see
The chunks are named after the file itself (route.tsx) instead of the actual route name. While this may seem minor, I personally think this really hurts.
It's quite convenient to look at the build output and know at a glance how large each route file is.
Right now, it would be very difficult to figure out which route built to which file.
I'm honestly not sure if this is just a bug or an oversight (I don't know enough about Vite). It's interesting that the _index route still maintains its filename correctly while the others become generic.
Looking forward to hearing more 🙏
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all, I came accross some odd behavior from the vite compiler and wanted to raise a discussion/issue about it.
To demonstrate what I mean, let's take a simple remix project made with
--template remix-run/remix/templates/vite
This project has three routes -
_index.tsx
,about.tsx
andterms.tsx
.When we run
remix vite:build
we see the following outputAs you can see, Vite correctly names the route module chunks after the route name.
Now let's see what happens if we use route module folders. Aka if I change them to
_index/route.tsx
,about/route.tsx
andterms/route.tsx
.Again, running
remix vite:build
we seeThe chunks are named after the file itself (
route.tsx
) instead of the actual route name. While this may seem minor, I personally think this really hurts.It's quite convenient to look at the build output and know at a glance how large each route file is.
Right now, it would be very difficult to figure out which route built to which file.
I'm honestly not sure if this is just a bug or an oversight (I don't know enough about Vite). It's interesting that the _index route still maintains its filename correctly while the others become generic.
Looking forward to hearing more 🙏
Beta Was this translation helpful? Give feedback.
All reactions