I'm following the steps in this article on a default Magento sample data version and I want to remove 'mage/translate-inline' ADM from injected into the page. See here - https://prnt.sc/t7ao6j

Is there a way to remove deps config in requirejs-config.js in the other module from my module?


2 Answers 2


I found a way to do it. In [Namespace]/[Module]/view/frontend/requirejs-config.js add this:

// The config variable used to requirejs accepts this file
var config = {};

    var depsNodeRef = require.s.contexts._.config.deps;

    var index = depsNodeRef.indexOf('path/to/file');
    if (index > -1) {
        depsNodeRef.splice(index, 1);

Use a patch for modify the requirejs-config.js file in vendor/magento/module-translation ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.