Apr 24, 2020 | Divi Resources

How to create custom Divi module part 3: Understanding yarn commands

In the previous tutorial, we have set up the structure of the divi module. For starting the development, we need to run some commands using package manager yarn. Those commands will help us in all the way to develop the custom Divi Module.

yarn start


This command executes your package.json file scripts. After running, yarn starts command on in your terminal. Add the newly created module(You’ll find Hello World Module) on your divi page builder. After adding the module, You may face the following issue-

[code lang=”js”]function (t){
return s.a.createElement(
p.a,g({rawContentProcesser:_.a.replaceCodeContentEntities},e.props)
)}[/code]

To fix this issue, Add the below-mentioned code in your DiviExtensionTutorial.php file. You may locate this file plugins/divi-extension-tutorial/includes folder. This code is for module development purposes. Don’t forget to remove this code while you create a zip file of your final Divi Module. Here, You may find more detail about this issue.

Keep the yarn start command running while developing the custom module. This will compile your module automatically when you make any changes in CSS, JS, or JSX file.

yarn build

This command will create the build file of your custom module.

yarn zip

This command will create the zip file.

yarn eject

After finishing everything, run yarn eject command.

In this video, you can see what we have done so far.

In the next tutorial, I’ll cover the module functions and setting fields. Leave a comment if you face any problem so far.

Posted By:
Mohd Arif
Dreamer, Schemer, Music & Technology enthusiast. He enjoys building things that speak HTTP. Arif is Development Head at Elicus and has over 8 years experience in the WordPress development industry.

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments

Submit a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

85 Stunning Divi WooCommerce Templates for Your Store

85 Stunning Divi WooCommerce Templates for Your Store

What type of Divi WooCommerce templates are you looking for? A shop page, product page, cart page, or everything? Whether you're behind one or all, you can always find layouts to fulfill the need to enhance a Divi WooCommerce store. Divi Extended is a premium place to...

Introducing the Marvelous Gravity Forms Styler for Divi

Introducing the Marvelous Gravity Forms Styler for Divi

To style and insert Gravity Forms in Divi isn't a simple task. It's a long, step-driven, and complex procedure. You have to deal with Gravity Forms functions, then Divi's, and finally use codes to make Gravity Forms look good. For a non-techie user, it's a nightmare....

How to Add the Instagram Feed to Your Divi Website

How to Add the Instagram Feed to Your Divi Website

Does your client want to add an Instagram Feed to Divi? Or is it only you who wants to improve the website’s engagement by setting up a live Instagram Feed on the website? In either case, it’s a smart move to leverage Instagram’s influence on your customers or...

Popular on Divi Extended

Divi Plus WooCommerce Extended Divi Child Theme Divi Header Layouts