Skip to content

Commit

Permalink
add react-dom dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
theKashey committed Dec 7, 2018
1 parent b4925f5 commit dad7707
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const self = require('./package');
const patch = require('./patch');

self.version = pkg.version;
self.dependencies = pkg.dependencies;

writeFileSync('package.json', JSON.stringify(self, null, 2));

Expand All @@ -12,6 +13,6 @@ if (!patched) {
throw new Error('could not patch react-dom')
}

writeFileSync('index.dev.js', patched);
writeFileSync('index.prod.js', readFileSync('./node_modules/react-dom/cjs/react-dom.production.min.js').toString());
writeFileSync('./dist/react-dom.hot.development.js', patched);
writeFileSync('./dist/react-dom.hot.production.js', readFileSync('./node_modules/react-dom/cjs/react-dom.production.min.js').toString());

File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
if (process.env.NODE_ENV === 'production') {
module.exports = require('./index.prod.js');
module.exports = require('./dist/react-dom.hot.production.js');
} else {
module.exports = require('./index.dev.js');
module.exports = require('./dist/react-dom.hot.development.js');
}
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hot-loader/react-dom",
"version": "16.7.0-alpha.2.1",
"version": "16.7.0-alpha.2",
"description": "The Hot version of React-DOM",
"main": "index.js",
"scripts": {
Expand All @@ -23,5 +23,11 @@
"homepage": "https://github.com/hot-loader/react-dom#readme",
"devDependencies": {
"react-dom": "^16.7.0-alpha.2"
},
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
"prop-types": "^15.6.2",
"scheduler": "^0.12.0-alpha.2"
}
}

0 comments on commit dad7707

Please sign in to comment.