New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

babel-plugin-here

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-here

Replace instances of HERE identifier with code position strings

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

Babel Plugin Here (babel-plugin-here)

Replace instances of HERE identifier with code position strings.

Why?

This plugin is useful when you don't have sourcemaps and you're looking at errors in the console and having trouble knowing where they've come from. You can setup this plugin, and use HERE in error message like throw new Error(`${HERE} Some useful message`).

Setup

Install

npm install --save-dev babel-plugin-here

Babel config

babel.config.json

{
	"plugins": [ "babel-plugin-here" ]
}

TSConfig (if using TypeScript)

tsconfig.json

{
	"compilerOptions": {
		"types": [ "babel-plugin-here/env" ]
	}
}

Example

In

src/foo.js

console.log(HERE)

Out

dist/foo.js

console.log("src/foo.js:1:13")

Keywords

babel

FAQs

Package last updated on 29 Oct 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