Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webpack-strip-block

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-strip-block - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

8

index.js
/*jslint node:true */
"use strict";
var loaderUtils = require("loader-utils");
function StripBlockLoader(content) {
var query = loaderUtils.parseQuery(this.query);
var startComment = query.start || 'develblock:start';
var endComment = query.end || 'develblock:end';
var startComment = 'develblock:start';
var endComment = 'develblock:end';
var regexPattern = new RegExp("[\\t ]*\\/\\* ?" + startComment + " ?\\*\\/[\\s\\S]*?\\/\\* ?" + endComment + " ?\\*\\/[\\t ]*\\n?", "g");

@@ -10,0 +12,0 @@

{
"name": "webpack-strip-block",
"version": "0.0.3",
"version": "0.1.0",
"description": "Webpack plugin to strip blocks of code that's only intended for development purposes",

@@ -21,3 +21,8 @@ "main": "index.js",

},
"contributors": [{
"name": "Alexander Wunschik",
"email": "mail@wunschik.it",
"url": "http://www.wunschik.it"
}],
"license": "MIT"
}
}

@@ -36,2 +36,13 @@ Webpack Strip Block

};
```
```
It is also possible to overwrite the `start` and `end` variables with url-encoded string values:
```javascript
{
module: {
loaders: [
{ test: /\.js$/, loader: "webpack-strip-block?start=DEV-START&end=DEV-END" }
]
}
};
```
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