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”