You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just removed layering support from Require-IS for this kind of a workflow, and it feels a bit wrong leaving people on their own with the paths configuration post-processing.
If a JSON object was included in the build.txt, then instead of having parse the build output, one could just read or copy and paste the build.txt to extract out the JSON layer data. This can then be directly copied into the production paths config for optimal layer loading.
Is this about mapping loader plugin IDs to built resources? I would rather handle that in 2.1.3, with the optiimzer injecting the optimization. Or, if this about having access to the build config, isn't that just reading the build.js file directly? it is already in JS or JSON format (depending on the options).
This data object is only shown in text form in the build output, requiring parsing. It doesn't exist as the modules in the build config because we need to know the final inclusion lists for each module, including all sub dependencies and exclusions applied.
The above can then be used to form a direct paths mapping:
This is why I was wondering if it would be possible to use the same paths configuration as above to allow the pluginMap support as in requirejs/requirejs#497, because it is nice being able to apply the same approach here.
OK, I added some notes to requirejs/requirejs#497 to allow injecting a config for non-plugin resources too, which should then address the need from this ticket. Going to close this ticket in favor of the other one, as it gets more to the heart of config injection vs dealing with the build.txt.
Activity
jrburke commentedon Nov 30, 2012
Is this about mapping loader plugin IDs to built resources? I would rather handle that in 2.1.3, with the optiimzer injecting the optimization. Or, if this about having access to the build config, isn't that just reading the build.js file directly? it is already in JS or JSON format (depending on the options).
guybedford commentedon Dec 1, 2012
This is about having an object map from layer moduleIds to arrays of the defined moduleIds within them.
Something like:
This data object is only shown in text form in the build output, requiring parsing. It doesn't exist as the
modulesin the build config because we need to know the final inclusion lists for each module, including all sub dependencies and exclusions applied.The above can then be used to form a direct paths mapping:
This is why I was wondering if it would be possible to use the same paths configuration as above to allow the
pluginMapsupport as in requirejs/requirejs#497, because it is nice being able to apply the same approach here.jrburke commentedon Dec 3, 2012
OK, I added some notes to requirejs/requirejs#497 to allow injecting a config for non-plugin resources too, which should then address the need from this ticket. Going to close this ticket in favor of the other one, as it gets more to the heart of config injection vs dealing with the build.txt.