Socket
Socket
Sign inDemoInstall

@flareapp/flare-webpack-plugin-sourcemap

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flareapp/flare-webpack-plugin-sourcemap - npm Package Compare versions

Comparing version 1.0.7 to 1.0.9

12

dist/index.js

@@ -31,4 +31,8 @@ (function (factory) {

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

@@ -45,8 +49,7 @@ }

};
if (!compiler.hooks) {
// webpack 3
if (isWebpack3) {
compiler.plugin('after-emit', plugin);
return;
}
// webpack >4
// webpack >=4
compiler.hooks.afterEmit.tapPromise('GetSourcemapsAndUploadToFlare', plugin);

@@ -59,3 +62,4 @@ };

}
if (!this.runInDevelopment && compiler.options.mode === '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.');

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

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

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

"watch": "tsc --w -noEmit",
"build": "tsc"
"build": "tsc",
"prepublishOnly": "$npm_execpath build"
},

@@ -11,0 +12,0 @@ "devDependencies": {

@@ -44,4 +44,10 @@ import { Compiler, DefinePlugin, compilation } from 'webpack';

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

@@ -61,4 +67,3 @@ }

if (!compiler.hooks) {
// webpack 3
if (isWebpack3) {
compiler.plugin('after-emit', plugin);

@@ -68,4 +73,4 @@ return;

// webpack >4
compiler.hooks.afterEmit.tapPromise('GetSourcemapsAndUploadToFlare', plugin);
// webpack >=4
compiler.hooks.afterEmit.tapPromise('GetSourcemapsAndUploadToFlare', plugin as () => Promise<any>);
}

@@ -79,3 +84,6 @@

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

@@ -82,0 +90,0 @@ return false;

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