I have a custom js which will be loaded every time in backend, i want to get the site base url without using phtml pure in js, for now i'm stuck in this:

      function (url) {
       'use strict';
        var baseurl = url.build('/sitename/namespace_module/test/index');

which will give a result like this

the problem is, i have to define the sitename which is not flexible and correct for an extension, is there anyway to get the base url without using block and phtml file like this ?