Require.config 23.4 replacing paths NOT working anymore?

Hello community,

I used to use this technique to replace whole components in Smart View.

Example:

Extending components with module or require was not possible so I had to create my own component and replace all OPENTEXT instances with my own. Like I do not like how VIEW1 = nodestable.view.js behaves in a method - so I create my own VIEW2 = custom.nodestable.view.js and all VIEW1 instances will be replaced with my own one.

Why ?

Well if I want to change behaviors of a certain method which is not configurable I had to replace everything.

How it used to work

Well, in my src/bundles/my-all.js bundle file I used the code like this and it worked absolutely fine. I have tested that aproach on 22.1 version for example.

In the code below I replace a functionality of commentslist view - probably to prevent user to be able to delete comments or to edit them…


require(["require", "css"], function (require, css) {
    // Load the bundle-specific stylesheet
    css.styleLoad(require, "my/bundles/my-all");

    require.config({
        map: {
            "*": {
                // remap paths below in all file in all bundles
                "esoc/widgets/socialactions/commentslist.view": "my/controls/comments/ix.comment.view"}
                }
              })

How it does NOT work in 23.4

Not sure what was changed but exactly the same code seems to not work in version 23.4. I have copied the code exactly one by one - or I hope so, and seems that the remaping the paths does not work for me …

Summary - questions

Do you have same experience ?

How do you replace the whole OTEX components with your own ones?

Answers

  • Example how OTEX renames paths in 23.4 version CS

  • I have compared require.js files as the core of module loading system. Seems there are some changes between 22.1 (was working for us) and 22.3 also 23.4 - not working anymore.

  • I tried several ways how to replace the whole component but with no success. Can anybody help ?