How To Add Custom JavaScript In Magento 2 With RequireJS?

Blog
Spread the love

If you need Custom JavaScript In Magento2 then you can follow this blog step by step.

Step 1: Create registration.php file.

app/code/Bluethink/CustomJS/registration.php

Step 2: Create module.xml file.

app/code/Bluethink/CustomJS/etc/module.xml

Step 3: Create requirejs-config.js file.

app/code/Bluethink/CustomJS/view/frontend/requirejs-config.js

Step 4: Create test.phtml file.

app/code/Bluethink/CustomJS/view/frontend/templates/test.phtml

Step 5: Creat wkrequirejs.js file.

app/code/Bluethink/CustomJS/view/frontend/web/js/wkrequirejs.js

Step 6: Run the below command.

php bin/magento setup:upgrade

bluethinkinc_blog

bluethinkinc_blog

2022-09-30

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

Google Ads Conversion Tracking Through Magento Platform:

Spread the love Google Ads Conversion Tracking Through

bluethinkinc Blogs