webpack-bugsnag-plugins
Advanced tools
Comparing version 1.4.1 to 1.4.2
# Changelog | ||
## 1.4.2 (2019-09-10) | ||
### Changed | ||
- Allow `publicPath` to be an empty string (supports targeting Node and using the top level project directory for the output) (#39) | ||
## 1.4.1 (2019-08-12) | ||
@@ -4,0 +9,0 @@ |
{ | ||
"name": "webpack-bugsnag-plugins", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Webpack plugins for common Bugsnag actions", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -8,6 +8,8 @@ 'use strict' | ||
const LOG_PREFIX = `[BugsnagSourceMapUploaderPlugin]` | ||
const PUBLIC_PATH_ERR = | ||
'Cannot determine "minifiedUrl" argument for bugsnag-sourcemaps. ' + | ||
'Please set "publicPath" in Webpack config ("output" section) ' + | ||
'or set "publicPath" in BugsnagSourceMapUploaderPlugin constructor.' | ||
const PUBLIC_PATH_WARN = | ||
'`publicPath` is not set.\n\n' + | ||
' Source maps must be uploaded with the pattern that matches the file path in stacktraces.\n\n' + | ||
' To make this message go away, set "publicPath" in Webpack config ("output" section)\n' + | ||
' or set "publicPath" in BugsnagSourceMapUploaderPlugin constructor.\n\n' + | ||
' In some cases, such as in a Node environment, it is safe to ignore this message.\n' | ||
@@ -35,10 +37,5 @@ class BugsnagSourceMapUploaderPlugin { | ||
const stats = compilation.getStats().toJson() | ||
const publicPath = this.publicPath || stats.publicPath | ||
const publicPath = this.publicPath || stats.publicPath || '' | ||
const outputPath = compilation.getPath(compiler.outputPath) | ||
if (!publicPath) { | ||
console.warn(`${LOG_PREFIX} ${PUBLIC_PATH_ERR}`) | ||
return cb() | ||
} | ||
const chunkToSourceMapDescriptors = chunk => { | ||
@@ -48,2 +45,6 @@ // find .map files in this chunk | ||
if (!publicPath) { | ||
console.warn(`${LOG_PREFIX} ${PUBLIC_PATH_WARN}`) | ||
} | ||
return maps.map(map => { | ||
@@ -50,0 +51,0 @@ // for each *.map file, find a corresponding source file in the chunk |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32342
634