0.1.0 • Published 4 years ago

babel-plugin-transform-node-filepath v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

babel-plugin-transform-node-filepath

Transforms filename and dirname into their respective values

Installation

npm i -D babel-plugin-transform-node-filepath

yarn add -D babel-plugin-transform-node-filepath

Add babel-plugin-transform-node-filepath to babel.config.js/.babelrc.js, eg

{
  "plugins": ["transform-node-filepath"]
}

Usage

Use __filename and __dirname as expected.