Skip to content

Conversation

@cipix2000
Copy link

@cipix2000 cipix2000 commented Mar 2, 2018

Make the plugin resolve paths synchronously, add an extensions option

and a custom regexp.

Also new APIs are added:

  • getRegex - allows a configurable way to name the folders ( for example @fallback instead of #fallback#)
  • pathMatchesPrefix
  • resolveComponentPath

We can use the last ones in custom resolvers, for example for a custom css-import resolve function we can have:

const resolveFile = path =>
    fallbackDirectoryResolverPlugin().pathMatchesPrefix(path) ? fDRP.resolveComponentPath(path) : path;

The reason for making this plugin synchronous is that the eslint webpack imports plugins doesn't work with resolver plugins that return promises.

cipix2000 and others added 13 commits March 1, 2018 18:11
Needs the target parameter to be an empty object.
Needs the target parameter to be an empty object.
Don't overwrite default options while making a copy
The postfix indicates that this is release #1
of our fork, based on the upstream 0.1.4 version.
The method used to hook into the resolver was already deprecated
in Webpack v4. In Webpack v5 it doesn't work at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants