Socket
Socket
Sign inDemoInstall

babel-plugin-conditional-compile

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-conditional-compile - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

9

dist/index.js

@@ -10,3 +10,4 @@ 'use strict';

mapKeys = [],
mapFuncs = undefined;
mapFuncs = undefined,
dropDebugger = undefined;
return {

@@ -17,2 +18,3 @@ visitor: {

dropDebugger = !!PluginPass.opts.dropDebugger;
if (define) {

@@ -31,2 +33,7 @@ mapKeys = Object.getOwnPropertyNames(define);

},
DebuggerStatement: function DebuggerStatement(path){
if (dropDebugger) {
path.remove();
}
},

@@ -33,0 +40,0 @@ Conditional: {

2

package.json
{
"name": "babel-plugin-conditional-compile",
"version": "0.0.3",
"version": "0.0.4",
"description": "babel plugin for conditional compile",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -59,1 +59,15 @@ #babel-plugin-conditional-compile

```
## Options
The available options are
```
{
define:{
APP_VERSION:'1.0.0',
IS_DEV:true
},
dropDebugger:false
}
```
* any variable same with key name in define object will be replace by its value
* when dropDebugger set true, the `debugger;` statement will be removed

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc