chore: Add hot-reloading for the React app
This commit is contained in:
parent
7982cf4fb4
commit
20d8f0f5db
@ -22,6 +22,7 @@ module.exports = {
|
||||
// https://babeljs.io/docs/en/options#babelrcroots
|
||||
babelrcRoots: ['./platform/*', './extensions/*'],
|
||||
plugins: [
|
||||
'react-hot-loader/babel',
|
||||
'inline-react-svg',
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
"prettier": "^1.18.2",
|
||||
"react": "^16.8.6",
|
||||
"react-dom": "^16.8.6",
|
||||
"react-hot-loader": "^4.12.11",
|
||||
"react-scripts": "^3.0.1",
|
||||
"redux-testkit": "^1.0.6",
|
||||
"shader-loader": "^1.3.1",
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
|
||||
import './config';
|
||||
|
||||
// Polyfills
|
||||
// PWA Only?
|
||||
import 'core-js/features/array/flat';
|
||||
@ -194,5 +197,5 @@ function _makeAbsoluteIfNecessary(url, base_url) {
|
||||
return base_url + url;
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default hot(App);
|
||||
export { commandsManager, extensionManager, hotkeysManager };
|
||||
|
||||
14
yarn.lock
14
yarn.lock
@ -15184,6 +15184,20 @@ react-hot-loader@4.3.6:
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
shallowequal "^1.0.2"
|
||||
|
||||
react-hot-loader@^4.12.11:
|
||||
version "4.12.11"
|
||||
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.11.tgz#06bd618d0a7343c8afa4a31206844f651193bae5"
|
||||
integrity sha512-ySsg1hPwr/5dkZCJVp1nZRbwbpbEQ+3e2+bn/D681Wvr9+o+5bLKkTGq0TXskj8HgCS3ScysXddOng9Cg+JKzw==
|
||||
dependencies:
|
||||
fast-levenshtein "^2.0.6"
|
||||
global "^4.3.0"
|
||||
hoist-non-react-statics "^3.3.0"
|
||||
loader-utils "^1.1.0"
|
||||
prop-types "^15.6.1"
|
||||
react-lifecycles-compat "^3.0.4"
|
||||
shallowequal "^1.1.0"
|
||||
source-map "^0.7.3"
|
||||
|
||||
react-hot-loader@^4.8.4:
|
||||
version "4.12.10"
|
||||
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.10.tgz#b3457c0f733423c4827c6d2672e50c9f8bedaf6b"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user