babel-plugin-transform-import-meta

  • Version 2.2.1
  • Published
  • 12.7 kB
  • 2 dependencies
  • BSD license

Install

npm i babel-plugin-transform-import-meta
yarn add babel-plugin-transform-import-meta
pnpm add babel-plugin-transform-import-meta

Overview

Transforms import.meta for nodejs environments

Index

Functions

Interfaces

Functions

function default

default: () => PluginObj;
  • Rewrites known import.meta[1] properties into equivalent non-module node.js expressions. In order to maintain compatibility with plugins transforming non-standard properties, this plugin transforms only known properties and does not touch expressions with unknown or without member property access. Properties known to this plugin:

    - url[2]

    [1]: https://github.com/tc39/proposal-import-meta [2]: https://html.spec.whatwg.org/#hostgetimportmetaproperties

Interfaces

interface PluginOptions

interface PluginOptions {}

    property module

    module?: 'CommonJS' | 'ES6' | undefined;

      Package Files (1)

      Dependencies (2)

      Dev Dependencies (26)

      Peer Dependencies (1)

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/babel-plugin-transform-import-meta.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/babel-plugin-transform-import-meta)
      • HTML
        <a href="https://www.jsdocs.io/package/babel-plugin-transform-import-meta"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>