zouhir / preact-habitat

Zero configuration Preact widgets renderer in any host DOM
MIT License
518 stars 43 forks source link

Generate file per component #34

Closed nosuchip closed 2 years ago

nosuchip commented 5 years ago

If application exposes dozen ob components it would be nice to build one bundle per component rather then global huge bundle with all components. Users may want to embed single block, not all.

gijo-varghese commented 5 years ago

@nosuchip did you find any solution? I'm looking for the same

nosuchip commented 5 years ago

@gijo-varghese nope, I tried many different approaches and finally decided that it is not possible at least without radical changes in webpack. I am not ready to dive into this stuff so deep.

gijo-varghese commented 5 years ago

@nosuchip hmmm. ok

zouhir commented 2 years ago

I am looking at migrating the entire project & example to Vite. I don't know what I don't know yet about Vita configurations but I will keep this request in mind during my investigations.

simonv3 commented 10 months ago

@zouhir did you get this migrated to vite? Or any insights? We're using preact-habitat with a project we just migrated to vite and are looking at now accomodating preact-habitat's insertion in the build process