From 946558024c971e49d07edccff3257fd4f8ff83e2 Mon Sep 17 00:00:00 2001 From: Andrew Courtice Date: Thu, 1 Dec 2022 12:29:00 +1000 Subject: [PATCH] fix: fixed conditional load for commonjs modules --- core/index.js | 4 ++-- extensions/action/index.js | 4 ++-- extensions/compose/index.js | 4 ++-- extensions/history/index.js | 4 ++-- extensions/lazy/index.js | 4 ++-- extensions/reset/index.js | 4 ++-- extensions/snapshot/index.js | 4 ++-- extensions/storage/index.js | 4 ++-- extensions/trace/index.js | 4 ++-- extensions/transaction/index.js | 4 ++-- harlem/index.js | 4 ++-- packages/task/index.js | 4 ++-- packages/utilities/index.js | 4 ++-- plugins/devtools/index.js | 4 ++-- plugins/ssr/index.js | 4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/core/index.js b/core/index.js index 364f637e..5c3fcea0 100644 --- a/core/index.js +++ b/core/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/action/index.js b/extensions/action/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/action/index.js +++ b/extensions/action/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/compose/index.js b/extensions/compose/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/compose/index.js +++ b/extensions/compose/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/history/index.js b/extensions/history/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/history/index.js +++ b/extensions/history/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/lazy/index.js b/extensions/lazy/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/lazy/index.js +++ b/extensions/lazy/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/reset/index.js b/extensions/reset/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/reset/index.js +++ b/extensions/reset/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/snapshot/index.js b/extensions/snapshot/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/snapshot/index.js +++ b/extensions/snapshot/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/storage/index.js b/extensions/storage/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/storage/index.js +++ b/extensions/storage/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/trace/index.js b/extensions/trace/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/trace/index.js +++ b/extensions/trace/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/extensions/transaction/index.js b/extensions/transaction/index.js index 364f637e..5c3fcea0 100644 --- a/extensions/transaction/index.js +++ b/extensions/transaction/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/harlem/index.js b/harlem/index.js index 364f637e..5c3fcea0 100644 --- a/harlem/index.js +++ b/harlem/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/packages/task/index.js b/packages/task/index.js index 364f637e..5c3fcea0 100644 --- a/packages/task/index.js +++ b/packages/task/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/packages/utilities/index.js b/packages/utilities/index.js index 364f637e..5c3fcea0 100644 --- a/packages/utilities/index.js +++ b/packages/utilities/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/plugins/devtools/index.js b/plugins/devtools/index.js index 364f637e..5c3fcea0 100644 --- a/plugins/devtools/index.js +++ b/plugins/devtools/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file diff --git a/plugins/ssr/index.js b/plugins/ssr/index.js index 364f637e..5c3fcea0 100644 --- a/plugins/ssr/index.js +++ b/plugins/ssr/index.js @@ -1,5 +1,5 @@ if (process.env.NODE_ENV === 'production') { - return require('./dist/index.cjs.prod.js'); + module.exports = require('./dist/index.cjs.prod.js'); } else { - return require('./dist/index.cjs.js'); + module.exports = require('./dist/index.cjs.js'); } \ No newline at end of file