Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

<mj-include>'s are ignored #2

Closed
joestrouth1 opened this issue Jun 19, 2017 · 2 comments
Closed

<mj-include>'s are ignored #2

joestrouth1 opened this issue Jun 19, 2017 · 2 comments

Comments

@joestrouth1
Copy link

joestrouth1 commented Jun 19, 2017

Super grateful for your work on this extension, as it brings better MJML functionality to my favorite editor.

Not sure if this is a feature request or a bug, but .mjml files imported using <mj-include> do not render in the preview window, nor are they included when exporting to HTML.

Trying to componentize my templates, but swapping out my preheader and header/nav sections with

<mj-include path="./preheader" />
<mj-include path="./header" />

results in a preview without either. Exporting to HTML does not include them either, they're just skipped. The linter doesn't recognize mj-include elements. Putting the includes in the same folder or a subfolder, including or omitting the file extension, makes no difference.

This functionality works in the MJML desktop app v2.4.0 running MJML v3.3.3

I am running extension v0.0.2 and VS code 1.13.1 on Windows 10 Creators Update.

@attilabuti
Copy link
Owner

Thank you for your contribution!
The issue is fixed on 0.0.4.

@menocomp
Copy link

Just had the same issue and it only worked when specifying the .mjml file extension.
This works:

<mj-include path="./partials/styles/body.mjml" />

This did not work:

<mj-include path="./partials/styles/body" />

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants