babel-plugin-transform-cup-globals
Advanced tools
Comparing version 1.0.0-rc.1 to 1.0.0-rc.2
@@ -18,3 +18,3 @@ module.exports = babel => { | ||
const {name} = path.node; | ||
if (name !== '__DEV__' && name !== '__TARGET__') { | ||
if (name !== '__DEV__' && name !== '__NODE__' && name !== '__BROWSER__') { | ||
return; | ||
@@ -35,7 +35,7 @@ } | ||
const target = state.opts.target; | ||
path.replaceWith(t.stringLiteral(target)); | ||
path.replaceWith(t.booleanLiteral(target === name)); | ||
} | ||
} | ||
} | ||
}, | ||
}, | ||
}; | ||
}; |
{ | ||
"name": "babel-plugin-transform-cup-globals", | ||
"version": "1.0.0-rc.1", | ||
"version": "1.0.0-rc.2", | ||
"description": "Babel plugin for transforming create-universal-package globals", | ||
@@ -5,0 +5,0 @@ "author": "Ryan Tsao <ryan.j.tsao@gmail.com>", |
1679