Socket
Book a DemoInstallSign in
Socket

babel-plugin-dev-module-alias

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-dev-module-alias

A plugin for finding aliases intended for development

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

babel-plugin-dev-module-alias

Installation

npm install babel-plugin-dev-module-alias --save-dev

Usage

.babelrc

{
  "presets": ["forbeslindesay"],
  "plugins": [],
  "env": {
    "development": {
      "plugins": [
        "dev-module-alias"
      ]
    }
  }
}

Then in an npm module you depend on (e.g. bicycle) you can use code like:

package.json

{
  // ...
  "developmentVersions": {
    "bicycle/lib/": "bicycle/dev/"
  }
}

This will replace all calls to require('bicycle/lib/whatever') with require('bicycle/dev/whatever'). This is useful for adding runtime type-checking etc. that you don't want to have included in production by accident.

Keywords

babel-plugin

FAQs

Package last updated on 28 Dec 2015

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