How to use the enhanced-resolve.create.sync 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 frctl / fractal / packages / lib / loader / src / loader.js View on Github external
constructor(opts = {}) {
    const fsStack = toArray(opts.fileSystem || []).concat(fs);
    const fileSystem = new SyncFileSystemStack(fsStack);
    const resolverOpts = Object.assign({}, opts, {fileSystem});
    _transforms.set(this, []);
    _fileSystem.set(this, fileSystem);

    _resolve.set(this, create.sync(resolverOpts));

    this.addTransform(require('./transforms/yaml'));
    this.addTransform(require('./transforms/json'));
  }