Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

babel-plugin-transform-import-meta-x

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-import-meta-x

Transforms import.meta[x] subproperties

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
534
-23.82%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-import-meta-x

This is a Babel plugin that transforms import.meta subproperty access to any other literal value.

This module is derived from the babel-plugin-transform-import-meta project.

Usage:

{
  "plugins": [
    "babel-plugin-transform-import-meta-x",
    { replacements: { foobar: '{}' } }
  ]
}

Run on the following code it will produce the following output:

// src.js
console.log(import.meta.foobar);
// output:
console.log({});

Keywords

babel-plugin

FAQs

Package last updated on 06 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts