How to use the enhanced-resolve.SyncNodeJsInputFileSystem function in enhanced-resolve

To help you get started, we’ve selected a few enhanced-resolve examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github istarkov / babel-plugin-webpack-loaders / src / plugin.js View on Github external
({ resolve: configResolve }) => (
    ResolverFactory.createResolver({
      fileSystem: new SyncNodeJsInputFileSystem(),
      ...configResolve,
      // enhanced-resolve does not support modulesDirectories, lets add 2 modules
      ...(
        configResolve && (configResolve.modules || configResolve.modulesDirectories) && {
          modules: [
            ...(configResolve.modules || []),
            ...(configResolve.modulesDirectories || []),
          ],
        }
      ),
    })
  )
);