1.If you generate a path in windows, it contains the \ character as separator instead of /.
2.You correctly use path.join and other utilities to construct a proper windows path.
3.On line 73 you append it to the resulting file.
4.Since you put it into resulting file without escaping, the \ character is treated as an escape character and the path becomes incorrect (like require('.\partial.dust') instead of require('.\\partial.dust')).
5.I think using something to escape the path before inserting it into file would be fine, or using unix-like paths only (since node can handle converting them to windows by itself).
Problem is with: https://github.com/scottbrady/dustjs-browserify/blob/master/lib/dustjs-browserify.js#L73
1.If you generate a path in windows, it contains the
\
character as separator instead of/
. 2.You correctly usepath.join
and other utilities to construct a proper windows path. 3.On line 73 you append it to the resulting file. 4.Since you put it into resulting file without escaping, the\
character is treated as an escape character and the path becomes incorrect (likerequire('.\partial.dust')
instead ofrequire('.\\partial.dust')
). 5.I think using something to escape the path before inserting it into file would be fine, or using unix-like paths only (since node can handle converting them to windows by itself).