attilabuti / vscode-mjml

This repo is archived. MJML preview, lint, compile for Visual Studio Code.

Home Page:https://marketplace.visualstudio.com/items?itemName=attilabuti.vscode-mjml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<mj-include>'s are ignored

joestrouth1 opened this issue · comments

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.

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

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" />