Skip to content

Commit

Permalink
Add production bundle for TestUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Oct 5, 2017
1 parent 97fd6b7 commit 4206017
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/test-utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
throw Error('test-utils is not available in production mode.');
module.exports = require('./cjs/react-dom-test-utils.production.min.js');
} else {
module.exports = require('./cjs/react-dom-test-utils.development');
module.exports = require('./cjs/react-dom-test-utils.development.js');
}
2 changes: 1 addition & 1 deletion scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const bundles = [
},
{
babelOpts: babelOptsReact,
bundleTypes: [FB_DEV, NODE_DEV],
bundleTypes: [FB_DEV, NODE_DEV, NODE_PROD],
config: {
destDir: 'build/',
globals: {
Expand Down
4 changes: 4 additions & 0 deletions scripts/rollup/results.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@
"react-test-renderer-shallow.production.min.js (NODE_PROD)": {
"size": 4508,
"gzip": 1637
},
"react-dom-test-utils.production.min.js (NODE_PROD)": {
"size": 11608,
"gzip": 4241
}
}
}

0 comments on commit 4206017

Please sign in to comment.