require.js text plugin adds “.js” to the file name

后端 未结 7 1052
旧时难觅i
旧时难觅i 2021-01-08 00:31

I\'m trying to work with requirejs and text plugin and I have weird problem.

I have two web servers:

  1. localhost:3000 - act as CDN and h
7条回答
  •  無奈伤痛
    2021-01-08 01:00

    Such config does not work in current text! plugin. My solution was in overriding useXhr method in 'text' module

    require(["text"], function (text)
    {   if( location.port == '4502' || location.port == '4503' )// AEM env-t
            text.useXhr = function(){ return true; }
        require(["loader/widget/WidgetLoader"]); // dependent on HTML templates by text! plugin
    });
    

提交回复
热议问题