UNPKG

678 BTypeScriptView Raw
1import type { PluginObj } from '@babel/core';
2export interface PluginOptions {
3 module?: 'CommonJS' | 'ES6' | undefined;
4}
5/**
6 * Rewrites known `import.meta`[1] properties into equivalent non-module node.js
7 * expressions. In order to maintain compatibility with plugins transforming
8 * non-standard properties, this plugin transforms only known properties and
9 * does not touch expressions with unknown or without member property access.
10 * Properties known to this plugin:
11 *
12 * - `url`[2]
13 *
14 * [1]: https://github.com/tc39/proposal-import-meta
15 * [2]: https://html.spec.whatwg.org/#hostgetimportmetaproperties
16 */
17export default function (): PluginObj;