Skip to content

Commit 8248812

Browse files
authored
Merge pull request #12 from tempo22/add-minifiedfile-upload
Add option to upload minified files
2 parents 1153069 + 017afcf commit 8248812

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ module.exports = {
3636
},
3737
includeAppVersion: true,
3838
deleteSourcemaps: true,
39-
overwrite: true
39+
overwrite: true,
40+
uploadMinifiedFile: false
4041
},
4142

4243
requiredConfig: ['apiKey', 'publicUrl'],
@@ -50,6 +51,7 @@ module.exports = {
5051
let publicUrl = this.readConfig('publicUrl');
5152
let overwrite = this.readConfig('overwrite');
5253
let includeAppVersion = this.readConfig('includeAppVersion');
54+
let uploadMinifiedFile = this.readConfig('uploadMinifiedFile');
5355

5456
log('Uploading sourcemaps to bugsnag', { verbose: true });
5557

@@ -64,6 +66,12 @@ module.exports = {
6466
sourceMap: this._readSourceMap(path.join(distDir, mapFilePath))
6567
};
6668

69+
if (uploadMinifiedFile) {
70+
formData.minifiedFile = this._readSourceMap(
71+
path.join(distDir, jsFilePath)
72+
);
73+
}
74+
6775
// the presence of any value for this flag causes the API to interpret it as
6876
// true, so only add it to the payload if it is truthy
6977
if (overwrite) {

0 commit comments

Comments
 (0)