Skip to content

Commit 422f71e

Browse files
Empactsalmamali
authored andcommitted
Don't mix import and module.exports (#257)
Webpacker disallows accessing module.exports from within es6 files, e.g. where import is used. This assignment results in: "Attempted to assign to readonly property" webpack/webpack#3491
1 parent 4087ede commit 422f71e

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,4 +957,4 @@ InstabugModule.Chats = Chats;
957957
InstabugModule.Replies = Replies;
958958
InstabugModule.CrashReporting = CrashReporting;
959959

960-
module.exports = InstabugModule;
960+
export default InstabugModule;

modules/BugReporting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let { Instabug } = NativeModules;
1010
* BugReporting
1111
* @exports BugReporting
1212
*/
13-
module.exports = {
13+
export default {
1414
/**
1515
* Enables and disables manual invocation and prompt options for bug and feedback.
1616
* @param {boolean} isEnabled

modules/Chats.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
* Chats
88
* @exports Chats
99
*/
10-
module.exports = {
10+
export default {
1111
/**
1212
* Enables and disables everything related to creating new chats.
1313
* @param {boolean} isEnabled

modules/CrashReporting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let { Instabug } = NativeModules;
66
* CrashReporting
77
* @exports CrashReporting
88
*/
9-
module.exports = {
9+
export default {
1010
/**
1111
* Enables and disables everything related to crash reporting including intercepting
1212
* errors in the global error handler. It is enabled by default.

modules/FeatureRequests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let {Instabug} = NativeModules;
55
* FeatureRequests
66
* @exports FeatureRequests
77
*/
8-
module.exports = {
8+
export default {
99

1010
/**
1111
* Sets whether users are required to enter an email address or not when

modules/Replies.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let { Instabug } = NativeModules;
66
* Replies
77
* @exports Replies
88
*/
9-
module.exports = {
9+
export default {
1010
/**
1111
* Enables and disables everything related to receiving replies.
1212
* @param {boolean} isEnabled

modules/Surveys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let { Instabug } = NativeModules;
1010
* Surveys
1111
* @exports Surveys
1212
*/
13-
module.exports = {
13+
export default {
1414
/**
1515
* @summary Sets whether surveys are enabled or not.
1616
* If you disable surveys on the SDK but still have active surveys on your Instabug dashboard,

utils/InstabugUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let init = () => {
4242
global.ErrorUtils.setGlobalHandler(errorHandler);
4343
};
4444

45-
module.exports = {
45+
export default {
4646
parseErrorStack: parseErrorStack,
4747
captureJsErrors: init
4848
};

0 commit comments

Comments
 (0)