I try to mixin a widget js file following guide at here. I create a file requirejs-config.js in view/frontend directory. There's view/frontend/requirejs-config.js:

var config = {
   config: {
      mixins: {
          'mage/dataPost': {
              'Vendor_Training/js/dataPost-mixin': true

And there's view/frontend/web/js/dataPost-mixin.js:

], function($) {
    console.log('Mixin Working');
    return function (dataPost) {
       return dataPost;

And it's exist on pub/static/frontend/<Vendor>/<theme>/en_US/requirejs-config.js. But it's not working.

And it's working when I use map on requirejs-config.js to override.

The mixins js file not calling when dataPost.js run. enter image description here

Any help would be appreciated.

  • did you manage to do this? – Vlad Patru Jun 14 '18 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.