Skip to content

Commit

Permalink
fix: fixed conditional load for commonjs modules
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcourtice committed Dec 1, 2022
1 parent c143899 commit 9465580
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions core/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/action/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/compose/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/history/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/lazy/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/reset/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/snapshot/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/storage/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/trace/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions extensions/transaction/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions harlem/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions packages/task/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions packages/utilities/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions plugins/devtools/index.js
Original file line number Diff line number Diff line change
@@ -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');
}
4 changes: 2 additions & 2 deletions plugins/ssr/index.js
Original file line number Diff line number Diff line change
@@ -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');
}

0 comments on commit 9465580

Please sign in to comment.