Is it possible to stop requireJS from adding the .js file extension automatically?

If you don’t feel like adding a dependency on noext, you can also just append a dummy query string to the path to prevent the .js extension from being appended, as in:

require.config({
    paths: {
        'signalr-hubs': '/signalr/hubs?noext'
    }
});

This is what the noext plugin does.

Leave a Comment