-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using a require js config #64
Comments
If I understand correctly, you want to have something as an alias or short cut of In this case, this should work, but keep in mind:
PS: I would NOT use |
Thanks for your response, I tried switching the template to UMD, and moved the build directory up a level. However the The reason I'm trying to do this is I have some "legacy" cleint side codewritten in AMD. I would like to use urequire to deprecate the use of amd gradually, so that I can use commonjs modules throughout the entire application (the server is written in nodejs) without having to rewrite all the client side code in one go. The existing client side code has several aliases mentioned in the requirejs config. I'd like to avoid having to change too much of the structure of the code which is why I'm looking to use the existing aliases. Is there an example using the requirejs.config.json somewhere? |
What do you mean not processed ? Is it copied to the
The Hope this helps |
Sure, I've created a repo which hopefully explains the issue.
If you then open test.html in your browser and look at the javascript console, you will see a script error for wibble. Again thank you for your help with this. |
Sorry my friend, I have been hectic with work - I will look into this over the next few days and I will get you an answer - hope this is ok ! |
In your Changing these (running in node), it caused another problem (crashing, internal to uRequire) which I will have to look closer... Hopefully this week! Regards and sorry for delayed response... new country, new job, new life you see! Regards |
Also in your HTML, I guess you should be calling |
Hi,
I'm trying to use a requirejs config (speciically the paths option). I've followed the guide and added a requirejs.config.json file at the root of my bundle, however, the built code does not seem to be using the config.
My project structure looks like this:
scripts
--nested
----path
------wibble.js
--main.js
--require.js
--requirejs.config.json
my urequire config looks like:
my main.js looks like:
my requirejs.config.json looks like:
Do I need to call
require.config()
in main.js? If so what do I pass to it? It also doesn't seem like requirejs.config.json is being copied to the build folder. I tried adding it explicitly to the urequireconfig bundle.copy array which did copy it, but it is still not being used. Thanks for any help!The text was updated successfully, but these errors were encountered: