diff --git a/packages/docusaurus/lib/client/clientEntry.js b/packages/docusaurus/lib/client/clientEntry.js index a8a6eeb92d..9701031c77 100644 --- a/packages/docusaurus/lib/client/clientEntry.js +++ b/packages/docusaurus/lib/client/clientEntry.js @@ -7,7 +7,6 @@ import React from 'react'; import {hydrate, render} from 'react-dom'; -import {AppContainer} from 'react-hot-loader'; import {BrowserRouter} from 'react-router-dom'; import App from './App'; @@ -22,11 +21,9 @@ if (typeof window !== 'undefined' && typeof document !== 'undefined') { const renderMethod = process.env.NODE_ENV === 'production' ? hydrate : render; preload(routes, window.location.pathname).then(() => { renderMethod( - - - - - , + + + , document.getElementById('__docusaurus'), ); }); diff --git a/packages/docusaurus/lib/webpack/base.js b/packages/docusaurus/lib/webpack/base.js index 7df49fd230..826bb81ce3 100644 --- a/packages/docusaurus/lib/webpack/base.js +++ b/packages/docusaurus/lib/webpack/base.js @@ -37,7 +37,6 @@ module.exports = function createBaseConfig(props, isServer) { resolve: { symlinks: true, alias: { - 'react-dom': isProd ? 'react-dom' : '@hot-loader/react-dom', ejs: 'ejs/ejs.min.js', '@theme': themePath, '@site': siteDir, diff --git a/packages/docusaurus/lib/webpack/utils.js b/packages/docusaurus/lib/webpack/utils.js index adccc3fa82..78983d82fc 100644 --- a/packages/docusaurus/lib/webpack/utils.js +++ b/packages/docusaurus/lib/webpack/utils.js @@ -49,7 +49,6 @@ function getBabelLoader(isServer, babelOptions) { configFile: false, presets: ['@babel/env', '@babel/react'], plugins: [ - 'react-hot-loader/babel', isServer ? 'dynamic-import-node' : '@babel/syntax-dynamic-import', 'react-loadable/babel', ], diff --git a/packages/docusaurus/package.json b/packages/docusaurus/package.json index 8b1b936dc4..b41e875797 100644 --- a/packages/docusaurus/package.json +++ b/packages/docusaurus/package.json @@ -35,7 +35,6 @@ "@babel/preset-env": "^7.4.2", "@babel/preset-react": "^7.0.0", "@docusaurus/utils": "^2.0.0-alpha.6", - "@hot-loader/react-dom": "^16.8.4", "babel-jest": "^24.1.0", "babel-loader": "^8.0.0", "babel-plugin-dynamic-import-node": "^2.2.0", @@ -59,7 +58,6 @@ "portfinder": "^1.0.13", "react-dev-utils": "^8.0.0", "react-helmet": "^6.0.0-beta", - "react-hot-loader": "^4.8.2", "react-listener-provider": "^0.2.0", "react-loadable": "^5.5.0", "react-loadable-ssr-addon": "^0.1.6", diff --git a/yarn.lock b/yarn.lock index 2b000635a2..d5365830d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -848,16 +848,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@hot-loader/react-dom@^16.8.4": - version "16.8.6" - resolved "https://registry.yarnpkg.com/@hot-loader/react-dom/-/react-dom-16.8.6.tgz#7923ba27db1563a7cc48d4e0b2879a140df461ea" - integrity sha512-+JHIYh33FVglJYZAUtRjfT5qZoT2mueJGNzU5weS2CVw26BgbxGKSujlJhO85BaRbg8sqNWyW1hYBILgK3ZCgA== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.13.6" - "@jest/console@^24.3.0": version "24.3.0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.3.0.tgz#7bd920d250988ba0bf1352c4493a48e1cb97671e" @@ -5437,7 +5427,7 @@ fast-json-stable-stringify@^2.0.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4: +fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= @@ -6082,7 +6072,7 @@ global-prefix@^3.0.0: kind-of "^6.0.2" which "^1.3.1" -global@^4.3.0, global@^4.3.2: +global@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= @@ -6475,7 +6465,7 @@ hogan.js@^3.0.2: mkdirp "0.3.0" nopt "1.0.10" -hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.0: +hoist-non-react-statics@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.0.tgz#b09178f0122184fb95acf525daaecb4d8f45958b" integrity sha512-0XsbTXxgiaCDYDIWFcwkmerZPSwywfUqYmwT4jzewKTQSWoE6FCMoUVOeBJWK3E/CrWbxRG3m5GzY4lnIwGRBA== @@ -10565,7 +10555,7 @@ promzard@^0.3.0: dependencies: read "1" -prop-types@^15.5.0, prop-types@^15.5.3, prop-types@^15.5.4, prop-types@^15.6.1, prop-types@^15.6.2: +prop-types@^15.5.0, prop-types@^15.5.3, prop-types@^15.5.4, prop-types@^15.6.2: version "15.7.2" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== @@ -10877,21 +10867,6 @@ react-helmet@^6.0.0-beta: react-fast-compare "^2.0.2" react-side-effect "^1.1.0" -react-hot-loader@^4.8.2: - version "4.8.2" - resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.8.2.tgz#21a00cfca7fc848c53d78c34f6081f5ae3737dda" - integrity sha512-W5I8ps/32q5zL0mKfGGdPgsZfgljs/tdCTYxM6P1N8GV4+rUAu4g6ysy//5/jJpAFM0Bpgr6HrVLWK9h0jMdrA== - dependencies: - fast-levenshtein "^2.0.6" - global "^4.3.0" - hoist-non-react-statics "^3.3.0" - loader-utils "^1.1.0" - lodash "^4.17.11" - prop-types "^15.6.1" - react-lifecycles-compat "^3.0.4" - shallowequal "^1.0.2" - source-map "^0.7.3" - react-is@^16.6.0, react-is@^16.7.0: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" @@ -10902,11 +10877,6 @@ react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.5.tgz#c54ac229dd66b5afe0de5acbe47647c3da692ff8" integrity sha512-sudt2uq5P/2TznPV4Wtdi+Lnq3yaYW8LfvPKLM9BKD8jJNBkxMVyB0C9/GmVhLw7Jbdmndk/73n7XQGeN9A3QQ== -react-lifecycles-compat@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" - integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - react-listener-provider@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/react-listener-provider/-/react-listener-provider-0.2.0.tgz#fb6ce123f9e20ad948f75906ddf647db1df31f18" @@ -11650,14 +11620,6 @@ scheduler@^0.13.5: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@^0.13.6: - version "0.13.6" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" - integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - schema-utils@^0.4.5: version "0.4.7" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187" @@ -11836,7 +11798,7 @@ sha.js@^2.4.0, sha.js@^2.4.8: inherits "^2.0.1" safe-buffer "^5.0.1" -shallowequal@^1.0.1, shallowequal@^1.0.2: +shallowequal@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== @@ -12107,11 +12069,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - space-separated-tokens@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.2.tgz#e95ab9d19ae841e200808cd96bc7bd0adbbb3412"