js-conditional-compile-loader
Advanced tools
+5
-8
| var loaderUtils = require('loader-utils'); | ||
| var replacer = require('./replacer.js') | ||
| var options | ||
| module.exports = function (source) { | ||
| if (!options) { | ||
| options = Object.assign( | ||
| { isDebug: process.env.NODE_ENV === 'development' }, //默认的isDebug | ||
| loaderUtils.getOptions(this) | ||
| ); | ||
| } | ||
| return replacer.replaceMatched(source, options) | ||
| var options = loaderUtils.getOptions(this) | ||
| if (!('isDebug' in options)) { | ||
| options.isDebug = process.env.NODE_ENV === 'development'; //默认的isDebug | ||
| } | ||
| return replacer.replaceMatched(source, options) | ||
| }; |
+1
-1
| { | ||
| "name": "js-conditional-compile-loader", | ||
| "version": "1.0.13", | ||
| "version": "1.0.14", | ||
| "description": "A javascript conditional compile loader for webpack. 一个javascript条件编译的webpack loader。", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
10942
-0.07%24
-11.11%