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
Hi, I have a question about "resolve". I just want globbed files. I thought, this will work: require('./includes/*.js', {mode: 'expand'});
but internally it will use default resolve functions ["path-reduce", "strip-ext"]. If I dont want to use any resolving function I need to write my own resolve function, i.e: resolve:(base,files)=>files, or simply use empty array []. require('./includes/*.js', {mode: 'expand', resolve:[]}); require('./includes/*.js', {mode: 'expand', resolve:(base,files)=>files});
My questions:
is empty array a hack? I think it should return defaults.
what is the correct approach to omit any resolving functions
Thanks in advance
The text was updated successfully, but these errors were encountered:
I think both options are valid. I decided on the current default because I thought that would be the most-wanted behaviour. Your solutions to circumvent that both seem valid to me. Personally I'd prefer the empty array in your case, because it more accurately fits what you want (no resolvers)
Hi, I have a question about "resolve". I just want globbed files. I thought, this will work:
require('./includes/*.js', {mode: 'expand'});
but internally it will use default resolve functions ["path-reduce", "strip-ext"]. If I dont want to use any resolving function I need to write my own resolve function, i.e: resolve:(base,files)=>files, or simply use empty array [].
require('./includes/*.js', {mode: 'expand', resolve:[]});
require('./includes/*.js', {mode: 'expand', resolve:(base,files)=>files});
My questions:
Thanks in advance
The text was updated successfully, but these errors were encountered: