Skip to content

Magento 2 : Override HTML Template from Module

let’s say you want override this html template from your custom module (not from your custom theme)


first, create a module, for example module MyModule_TestOverride (i assume you already know, how to create basic magento 2 module)

  1. copy custom file file  shipping.phtml to MyModule\TestOverride\view\frontend\web\template
  2. create file requirejs-config.js, put in MyModule\TestOverride\view\frontend
var config = {
    map: {
        '*': {

3.  last step, from your shell, execute this command : “php bin/magento setup:static-content:deploy”


Comments are closed.