HipsterBrown / rails-react-playground

An example repo setup for serving lazy-loaded React components through Rails using pnpm workspaces, Vite, and custom elements. Read more here: https://hipsterbrown.com/musings/musing/islands-on-the-rails/
4 stars 0 forks source link

Assets in Islands #1

Open tcarac opened 1 year ago

tcarac commented 1 year ago

@HipsterBrown I'm familiar with the islands concepts also implemented in different frameworks like Astro,etc. My question around this implementation is how do you expect non js assets living in islands to be handled ? Talking about imgs and css specifically ?

HipsterBrown commented 1 year ago

Since the "island" functionality is mostly enabled by Vite in this repo's implementation, then the static assets and CSS concerns would be handled by the build tool as well:

Static - https://vitejs.dev/guide/assets.html

CSS - https://vitejs.dev/guide/features.html#css