Closed untoldone closed 11 years ago
Thanks for reporting!
The code you posted looks perfectly fine, I don't think it's something on your side, it rather looks like the plugin stopped working correctly with r.js. I won't be available next week, but I'll look into this as soon as I can when I'm back.
What version of r.js are you using?
r.js version 2.0.6. It's actually possible I'm miss understanding how the plugin is intended to work?
I fixed the issue by removing the if(config.isbuild ...) block. Now when I run r.js it picks the file version that load is called on to include in the build.
If the feature map used during build contains feature tests, the plugin should keep them and evaluate them during run-time, and not during build-time, so that builds can be used for different scenarios. But maybe this should be configurable...
The last version of r.js I checked against was 0.24 I guess, so it might well be that something changed there - sorry for the inconvenience.
Builds work fine for me now with latest r.js – can you please check to make sure it works for you, too?
I haven't dug into the issue yet as I don't know much about requirejs's plugin arch yet -- but I got the following error when trying to use this with r.js to build:
This is when using a map that looks like this:
a require line that looks like:
and an app config that looks like (simplified for the purpose of removing seemingly irrelevant parts of config):
I imagine this is just something I'm doing wrong but a pointer in the readme (maybe an FAQ or pitfalls section or something?) would have allowed me to skip over learning more about requirejs plugins to figure out whats going on.
Thanks!