Yes there is. You can look in pub static to find out how the path to the static resource is built.
How it works
Each asset is available from the enter code here "RequireJS ID" page. It seems like a real way, but varied.
For example, the file http://magento.vg/static/adminhtml/Magento/backend/en_US/Magento_Theme/favicon.ico .
This is the real path /app/code/Magento/Theme/view/adminhtml/web/favicon.ico .
Identifier RequireJS Magento_Theme/favicon.ico . This means that the file can be accessed via require("text!Magento_Theme/favicon.ico") or a similar command.
You may find that the RequireJS ID consists of the module name and the useful part of the path (after the web folder).
How to replace a file
So you have a file
vendor/magento/module-payment/view/frontend/web/template/payment/cc-form.html
The page loads src as
http://magento.vg/static/frontend/Magento/luma/en_US/Magento_Payment/template/payment/cc-form.html
So its RequireJS identifier is Magento_Payment/template/payment/cc-form.html
Side note: the components of the components of the internal user interface are equal to Magento_Payment/payment/cc-form . The words "template" and ".html" are added automatically.
And now you can replace this file for the application through the RequireJS configuration
var config = { "map": { "*": { "Magento_Payment/template/payment/cc-form.html": "<OwnBrand>_<OwnModule>/template/payment/cc-form.html" } } };
You put this piece of code in the requirejs-config.js in your module. It's all.
source share