Skip to content

Glob without resolving #31

@pmelisko

Description

@pmelisko

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:

  1. is empty array a hack? I think it should return defaults.
  2. what is the correct approach to omit any resolving functions

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions