![]() A lib folder, where custom components compiled from ES6 to ES5 with babel are located. ![]() You should not edit the files in this folder. mjmlconfig file where you are registering your custom components so they can be used by the MJML engine which wouldn’t know them otherwise.įirst, it is important that you change the path to your component in. The file will probably be hidden by default when you browse the folder. mjmlconfig in your terminal and replace the path to /lib/MjColumnImageText.js to your local path to this file. To get the local path from your terminal, run pwd ( echo %cd% on Windows). Run npm start so that index.mjml and your custom components are recompiled at each edit you’ll make. ![]() If you don’t want to automatically watch and recompile the files, you can simply run npm run build to compile them manually whenever you want. We’ll create a simple component that display a 2 column layout with an image on the left part and a text on the right part. It is intentionally basic as the idea is to show you how to create your own component specific to your need.
0 Comments
Leave a Reply. |