maizzle build production not always resolve nested <component>
See original GitHub issue- Maizzle Version: Framework v3.7.3
- Maizzle Version: CLI v1.4.0
- Node.js Version: v16.13.
I’m unable to reproduce it constantly, but it seems that sometimes (without changing anything from the code) Maizle is having problems to resolve nested components like this (see the teaser
component nested to content
component)
<extends src="src/layouts/main.html">
<block name="template">
<!-- HEADER -->
<component
src="src/components/header.html"
locals='{"url": "{{social.website}}"}'
>
<img
class="w-[274px] sm:w-[188px]"
src="https://s3.com/images/email.png"
alt="Website"
/>
</component>
<!-- CONTENT -->
<component
src="src/components/content.html"
locals='{"contentCtaUrl": "https://www.example.com", "contentCtaText": "Cta text"}'
>
<!-- EXAMPLE OF CUSTOM CONTENT ADDED UNDER BODY -->
<component
src="src/components/teaser.html"
locals='{"teaserUrl": "https://www.example.com", "teaserText": "Teaser text"}'
>
</component>
</component>
<!-- FOOTER -->
<component src="src/components/footer.html">
<img
class="w-[274px] sm:w-[188px]"
src="https://s3.com/images/email.png"
alt="Website"
/>
</component>
</block>
</extends>
do you know any problem similar to this? I’m saying that is not rendering because if I go to see the produced output in build_poduction
I see that inside the code I have a <component>
Also, I have another question: if we have nested components, is it a problem if I use the same name for the locals
? I would expect
that they respect the scope/hierarchy but just to be sure that it was not the problem (of the not rendering properly) I changed it back to have unique names (it’s less clean and scalable)
Issue Analytics
- State:
- Created a year ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Deeply(?) nested components only rendering intermittently #369
Maizzle Version: 2.6.0 Node.js Version: 12.18.3 I have a project I ... maizzle build production not always resolve nested <component> #693.
Read more >Build process | Maizzle
First, a global configuration object is computed by merging your Environment config on top of the base config.js . For example, running maizzle...
Read more >Components | Maizzle
Components help you organize blocks of markup that you use often by extracting them to a file, so you can reuse them in...
Read more >Events | Maizzle
You may use Events both when developing locally with the CLI build or serve commands, and when using the API with the render()...
Read more >@maizzle/framework: Versions | Openbase
This prerelease fixes an issue with destination directories for templates in nested folders when developing locally, and updates posthtml-modules to fix an ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Only if you plan on using them 😃
Not doing anything in that sense, yarn has probably cached your dependencies.