OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform Orocommerce 319: requirejs.yml – map-problem

This topic contains 2 replies, has 1 voice, and was last updated by  Frank 1 week, 1 day ago.

  • Creator
    Topic
  • #40203

    Frank
    Participant

    Hi there,

    I close a similiar thread yesterday. However, it remains a problem to me to define mapping in requirejs.yml:

    Goal:

    I want to override following js-file:

    OroShoppingListBundle/Resources/public/js/app/views/product-add-to-shopping-list-view.js

    by a custom one:
    MyShoppingListBundle/Resources/public/js/app/views/product-add-to-shopping-list-view.js

    My Steps:

    1) Creating requirejs.yml – file

    2.
    $ php ./bin/console oro:assets:install –env=dev –symlink
    $ php ./bin/console oro:requirejs.build –env=dev
    $ php ./bin/console cache:clear

    Problem:

    I have totally no idea, what kind of mapping to set ‘foo’, ‘foo1.2’, ‘foo1.o’ for …

    requirejs.org says:

    “When ‘some/newmodule’ does require('foo') it will get the foo1.2.js file, and when ‘some/oldmodule’ does require('foo') it will get the foo1.0.js file.”

    But I do not know what are the right path’s I have to use in my example.

    Could you be so kind, and give me a suggestion, what I have to put there?

    Thank you very much!
    Frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #40227

    Frank
    Participant

    SOLUTION is to
    put that file into /views/layouts/blank/config of custom bundle:

    Hope, it will be helpful for anyone to avoid searching hours for solve who to override requirejs.

    Regards from Germany
    Frank

    #40228

    Frank
    Participant

    Of course, correct path is
    /views/layouts/custom/config/requirejs.yml as mentioned by Andrey earlier.

    Frank.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No