How to use the reify/lib/compiler.js.makeUniqueId function in reify

To help you get started, we’ve selected a few reify 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 standard-things / esm / packages / babel-plugin-transform-es2015-modules-reify / index.js View on Github external
Program: function (path) {
        var transformOptions = {
          parse: parse
        };

        var code = path.hub.file.code;
        if (typeof code === "string") {
          transformOptions.moduleAlias =
            compiler.makeUniqueId("module", code);
        }

        compiler.transform(
          path.node,
          Object.assign(transformOptions, this.opts)
        );
      }
    }