lightning-js / blits

The Lightning 3 App Development Framework
Apache License 2.0
58 stars 9 forks source link

multi component support for precompiler #72

Closed uguraslan closed 4 months ago

uguraslan commented 4 months ago

Implements multi component support (in a single file) for the precompiler library. Fixes #65

michielvandergeest commented 4 months ago

Looks great!

With regards to commented-out components: this is still throwing an error for me when I include this for example:

// const bla = Blits.Component('Bla', {
//   components: {
//     PortalRow,
//   },
//   template: `
//     <Element w="1920" h="1080" color="red"></Element>
//   `,
// })
uguraslan commented 4 months ago

Hey @michielvandergeest, I copied the commented out code you provided at the end of src/pages/Colors.js and tested again but I did not get any errors. I also checked the compiled source code on the browser side and the precompiler did not add code section to it. Can you please check it again?

Screenshot 2024-02-27 at 11 50 29
michielvandergeest commented 4 months ago

Yeah I think it was a local caching issue on my end. This is working as expected.