This is how my file looks, and when I'm trying to bundle it up,
it gives me error that it couldn't find my_module/mutable
Error: ENOENT, no such file or directory '/www/my_module/mutable.js'
If I set nodeIdCompat:true
it will give me this error:
Error: ENOENT, no such file or directory '/www/my_module/defaults.json.js'
The ID compatibility is really just treating ".js" as not part of the module ID, and not following the normal requirejs route of treating it as a plain URL that does not get baseUrl and ID-to-path translation.
It is not aware of .json files, and even if it was, it would not treat those as JSON files, as in use an XHR to load them and JSON.parse() to convert that to a module value. A 'json!' loader plugin should be used for that, and since a loader plugin is needed, the nodeIdCompat is not focused on .json file suffixes. I'll update the http://requirejs.org/docs/api.html#config-nodeIdCompat section to mention this.