#Vite build config- outputting .js & .css files with the same naming convention as the component.

2 messages · Page 1 of 1 (latest)

latent hemlock
#

Let me give a bit of background.

I'm working in a small agency and we've recently embraced Astro for our Frontend only.

However, some projects are required to be built using a php based CMS. Expression Engine or Craft in our case.

I know it's a completely atypical, and really not Astro is meant for, but we'd love to be able to use Astro to produce the front end / static pages before it gets passed over and integrated by the BEs on our team.

In order for this to work, we've love the js and CSS to be output on component basis. So if you visited the homepage that includes <Testimonial> <HeroBanner> <Footer> etc.

We've love if in the head of the page, would pull in testimonial.js, herobanner.js & footer.js for example, & testimonial.css, herobanner.css & footer.css rather than bundling aggressively like the default bundling behavior.

We've struggled with making the vite config and combing the docs but haven't found anything we're happy with... so far.

Any suggestions or any Vite experts out there who could help build out the required config would be grately appreciated.

tame stagBOT
#
No-one around right now?

It looks like no-one has responded to your question yet. People might not be available right now or don’t know how to answer your question. Want an answer while you wait? Try asking our experimental bot in #1095492539085230272.