So it really looks like an interaction between the "dojo/i18n!" loader, Dojo's relative path resolution, the stock/custom widget path split in the Enterprise Portal, and possibly the _WidgetsInTemplateMixin.
Debugging imports inside minified AMD code bundles has proven frustrating enough that I'm not going to try figuring out the precise cause of the issue. I've instead completely removed all relative imports from the problematic widgets and replaced them with the likes of "dojo/i18n!widgets-custom/AddDataCustom/nls/strings" and data-dojo-type="widgets-custom/AddDataCustom/search/ResultsPane", which seems to have solved it.
I have to declare my own widgets-custom package in ArcGIS/Portal/apps/webappviewer/init.js in order to have a root location for the custom widget location in the Enterprise Portal, in my case arcgis.example.com/widgets/, so that it can be correctly resolved.
dojoConfig.packages = [{
name: "widgets",
location: window.path + "widgets"
}, {
name: "widgets-custom",
location: "//" + window.location.host + "/" + "widgets"
}, {
// Keep everything else the same
}];
Note that dojoConfig.packages is declared in two separate locations in that file, you might need to change both.
WAB Dev edition can make a similar modification in `client/stemapp/init.js` and `server/apps/<n>/init.js` by just pointing to the same location as the widgets package, so the references are also valid there.
@WenhaoWu: That might solve your problem, in case you haven't found a workaround yet.