How to use the babel-plugin-module-resolver/lib/normalizeOptions function in babel-plugin-module-resolver

To help you get started, we’ve selected a few babel-plugin-module-resolver 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 ark120202 / babel-lua / packages / babel-plugin-lua-module-resolver / src / index.js View on Github external
pre(file) {
    this.types = types;
    this.moduleResolverVisited = new Set();

    this.normalizedOpts = normalizeOptions(file.opts.filename, this.opts);

    const { luaRoot } = this.opts;
    if (luaRoot == null) throw new Error('Required option `luaRoot` is not defined');

    const optionalResolvePath = this.opts.resolvePath;
    this.normalizedOpts.resolvePath = createResolver(luaRoot, optionalResolvePath);
  },

babel-plugin-module-resolver

Module resolver plugin for Babel

MIT
Latest version published 8 months ago

Package Health Score

83 / 100
Full package analysis