Requiring relative paths with an AMD/RequireJS define

I'm using babel to transform app/vendor source code into AMD. I can't bundle because the existing app uses RequireJS client-side so files must remain separate and close to their source structure.

However, some npm packages include their client-side code with a simple index.js file. After our babel/amd transpile step, it might look like:

define(["module", './angular-resource'], function (module) {
  "use strict";

  module.exports = 'ngResource';
});

This module loads and exports the correct value in our app - but it fails to include './angular-resource'. As-is, I don't even see an HTTP request for the file. Once I change the import to './angular-resource.js' it fires an HTTP request, but it's relative to our baseUrl and not the module. Regardless, I can't really change this value because it comes from the npm package.

I tried creating an alias in the require paths config, with no luck. Without the extension there's never even an http request.

I've always struggled with relative paths and RequireJS. Is there any solution here to make './angular-resource' work as a relative file path?

Here's the config we're using, minus other unrelated libs:

require.config({
    baseUrl: appConfig.baseUrl + 'assets/dist',
    paths: {
        'angular-resource': 'libs/angular-resource/index',
    },
    shim: {
        angular: {
            deps: ['jquery'],
            exports: 'angular'
        },
        'angular-resource': ['angular']
    }
});