James Burke
James Burke
Ah great, I missed the fallbacks in the package-name-map. It looks like the browser would always get to claim the module ID first, no way to route around it. Not...
@anodynos the other option is to use a [UMD approach](https://github.com/umdjs/umd) to detect node vs. AMD when writing a library. When loading code for tests, you can use [requirejs in node](http://requirejs.org/docs/node.html)...
A path that may be workable, which I have not tried because I did not want to hijack that lower level part of node, is to just replace the require.extensions...
Thinking more about this, that require.extensions path is not really an improvement over just doing a `require('requirejs')` in that top level script, it will amount to the same effect. So...
If it is code you control, it is app code, and not something you want to publish as an npm-installabled package for other people who may not be using requirejs/AMD,...
@herby: if the .js file is loaded via a top-level requirejs() call, then requirejs loads it and `define` is available to it. If the .js file is loaded with node's...
@herby if amdefine is conditionally set to define [mentioned in the usage docs](https://github.com/jrburke/amdefine#usage), then I expect that to work out. If you are inlining amdefine in the file with your...
Sorry I missed this in my earlier pass. I think I understand, trying a full code block, so that hopefully it reflects what I think the question is. Say I...
If main.js uses requirejs to load the file, then define() should be available to that other file, and 'foo' should be visible to it. So, if in the above main.js,...
> Oh, this again looks like misunderstanding... of course I want to define foo in main.js. Just it should be requireable anywhere in the require tree, nor just in main.js....