Socket
Socket
Sign inDemoInstall

@flareapp/flare-webpack-plugin-sourcemap

Package Overview
Dependencies
4
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.10 to 1.0.11

14

dist/index.js

@@ -32,7 +32,8 @@ (function (factory) {

var isWebpack3 = !compiler.hooks;
var plugin = function (compilation) {
var plugin = function (compilation, cb) {
if (!_this.verifyOptions(compiler, compilation)) {
if (isWebpack3) {
return;
return cb();
}
cb();
return Promise.reject();

@@ -44,10 +45,11 @@ }

util_1.flareLog('Successfully uploaded sourcemaps to Flare.');
cb();
})
.catch(function (error) {
compilation.warnings.push("@flareapp/flare-webpack-plugin-sourcemap: " + error);
cb();
});
};
if (isWebpack3) {
compiler.plugin('after-emit', plugin);
return;
return compiler.plugin('after-emit', plugin);
}

@@ -62,4 +64,4 @@ // webpack >=4

}
if ((!this.runInDevelopment && compiler.options.mode === 'development') ||
process.env.NODE_ENV === 'development') {
if (!this.runInDevelopment &&
(compiler.options.mode === 'development' || process.env.NODE_ENV === 'development')) {
util_1.flareLog('Running webpack in development mode, not uploading sourcemaps to Flare.');

@@ -66,0 +68,0 @@ return false;

{
"name": "@flareapp/flare-webpack-plugin-sourcemap",
"version": "1.0.10",
"version": "1.0.11",
"main": "dist",

@@ -8,2 +8,3 @@ "license": "MIT",

"watch": "tsc --w -noEmit",
"watch-build": "tsc --w",
"build": "tsc",

@@ -10,0 +11,0 @@ "prepublishOnly": "$npm_execpath build"

@@ -46,8 +46,9 @@ import { Compiler, DefinePlugin, compilation } from 'webpack';

const plugin = (compilation: compilation.Compilation) => {
const plugin = (compilation: compilation.Compilation, cb: () => void) => {
if (!this.verifyOptions(compiler, compilation)) {
if (isWebpack3) {
return;
return cb();
}
cb();
return Promise.reject();

@@ -61,5 +62,7 @@ }

flareLog('Successfully uploaded sourcemaps to Flare.');
cb();
})
.catch((error: string) => {
compilation.warnings.push(`@flareapp/flare-webpack-plugin-sourcemap: ${error}`);
cb();
});

@@ -69,4 +72,3 @@ };

if (isWebpack3) {
compiler.plugin('after-emit', plugin);
return;
return compiler.plugin('after-emit', plugin);
}

@@ -85,4 +87,4 @@

if (
(!this.runInDevelopment && compiler.options.mode === 'development') ||
process.env.NODE_ENV === 'development'
!this.runInDevelopment &&
(compiler.options.mode === 'development' || process.env.NODE_ENV === 'development')
) {

@@ -89,0 +91,0 @@ flareLog('Running webpack in development mode, not uploading sourcemaps to Flare.');

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc