OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

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

This topic contains 2 replies, has 1 voice, and was last updated by  Frank 4 years, 8 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • 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)

The forum ‘OroPlatform’ is closed to new topics and replies.

Back to top