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
{{ message }}
Repository navigation
win32 incorrect assigned module names when filenames created via path.join / resolve #426
Using r.js for a custom builder of components on osx and win32 machines. for various reasons, path management in the builder is done via path.join / resolve / relative etc, which is taking into account path.sep (/ or ).
... which simply does not match any require statements in the code after. since it's for web building (URI), shouldn't there be a way to normalize the names for that?
The main, include, exclude, excludeShallow, and insertRequire options expect module IDs, which should all be front slashed strings, not back-slashed ones. In this case, using path.join is not necessary.
I need to do a better job though of enforcing that, as I can see where it is not obvious. Putting this in the 2.2.0 bucket.
yes, path.join is not needed here but this is written to illustrate a point. the context is a cli builder that works with files to find what and how to build and it passes the end result to require optimizer. I am currently working around this by replacing \ with / beforehand anyway, just thought it was never going to be useful to leave \ in the module names.
Activity
robertgorecki commentedon Apr 9, 2013
I would also vote for that. We work in multiple environments (osx, windows) and such path normalization during r.js build would be nice.
jrburke commentedon Apr 9, 2013
The main, include, exclude, excludeShallow, and insertRequire options expect module IDs, which should all be front slashed strings, not back-slashed ones. In this case, using path.join is not necessary.
I need to do a better job though of enforcing that, as I can see where it is not obvious. Putting this in the 2.2.0 bucket.
DimitarChristoff commentedon Apr 10, 2013
yes,
path.joinis not needed here but this is written to illustrate a point. the context is a cli builder that works with files to find what and how to build and it passes the end result to require optimizer. I am currently working around this by replacing \ with / beforehand anyway, just thought it was never going to be useful to leave \ in the module names.