Rate this post

Hello,

You may get trouble with editing javascript files in Magento 2, so in this post, we will solve it!

Editting javascript files in magento 2

Javascript (JS) in magento 2 is different from magento 1.

Normally, it’s create a temporary folder to store js files: pub/static

So some developers don’t know how to edit js files. After editing, nothing changes.

I will give you 2 ways to do that:

– Upgrade magento 2: Open terminal then use this command:

 

javascript files in magento 2
javascript files in magento 2

For this way, you have to use the command whenever you change js file.

– Change magento to developer mode: Use terminal again

 

javascript files in magento 2
javascript files in magento 2

Then you can do anything with js files in magento 2, just refresh your browser to see the result.

Good luck!

Your Magento website needs a powerful Magento ERP for stock control.

DON'T MISS THE CHANCE!

magento erp

How to Code Inline Editing Grid in Magento 2 Backend
How to Use Magento 2 Command Line Interface (CLI)?
Tagged:

Leave a Reply

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