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

strip-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

strip-loader - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

lib/index.js

@@ -17,3 +17,3 @@ /**

var regexPattern = new RegExp('\\n[ \\t]*(' + toStrip + ')\\([^\\);]+\\)[ \\t]*[;\\n]', 'g');
var regexPattern = new RegExp('(?:^|\\n)[ \\t]*(' + toStrip + ')\\([^\\);]+\\)[ \\t]*(?:$|[;\\n])', 'g');

@@ -20,0 +20,0 @@ var transformed = source.replace(regexPattern, '\n');

{
"name": "strip-loader",
"version": "0.1.0",
"version": "0.1.1",
"description": "Webpack loader to strip arbitrary functions out of your production code.",

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

@@ -75,12 +75,16 @@ # Strip Loader

### Remove stripped functions from bundle
### Replace unused module
So far we've removed the calls to the debug function, but webpack will still include the `debug` module in the final bundle. Use the [`IgnorePlugin`](http://webpack.github.io/docs/list-of-plugins.html#ignoreplugin)
So far we've removed the calls to the debug function, but your app still requires the `debug` module in the final bundle. Use the [`NormalModuleReplacementPlugin`](http://webpack.github.io/docs/list-of-plugins.html#normalmodulereplacementplugin) to replace it with an empty function:
```javascript
// webpack config
{
plugins: [
new webpack.IgnorePlugin(/debug/)
new webpack.NormalModuleReplacementPlugin(/debug/, process.cwd() + '/emptyDebug.js'),
]
}
// emptyDebug.js
module.exports = function() { return new Function(); };
```

@@ -87,0 +91,0 @@

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