Better redux devtooling support

This commit is contained in:
Dane Everitt 2019-12-22 00:16:13 -08:00
parent ef5d0fb4a2
commit 6966530165
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
4 changed files with 13 additions and 2 deletions

View File

@ -91,6 +91,7 @@
"postcss-preset-env": "^6.7.0",
"precss": "^4.0.0",
"purgecss-webpack-plugin": "^1.6.0",
"redux-devtools-extension": "^2.13.8",
"resolve-url-loader": "^3.0.0",
"source-map-loader": "^0.2.4",
"style-loader": "^0.23.1",

View File

@ -4,6 +4,7 @@ import socket, { SocketStore } from './socket';
import { ServerDatabase } from '@/api/server/getServerDatabases';
import files, { ServerFileStore } from '@/state/server/files';
import subusers, { ServerSubuserStore } from '@/state/server/subusers';
import { composeWithDevTools } from 'redux-devtools-extension';
export type ServerStatus = 'offline' | 'starting' | 'stopping' | 'running';
@ -88,4 +89,9 @@ export const ServerContext = createContextStore<ServerStore>({
state.socket.instance = null;
state.socket.connected = false;
}),
}, { name: 'ServerStore' });
}, {
compose: composeWithDevTools({
name: 'ServerStore',
trace: true,
}),
});

View File

@ -50,7 +50,7 @@ module.exports = {
cache: true,
target: 'web',
mode: process.env.NODE_ENV,
devtool: isProduction ? false : 'eval-source-map',
devtool: isProduction ? false : process.env.DEVTOOL || 'source-map',
performance: {
hints: false,
},

View File

@ -6136,6 +6136,10 @@ readdirp@^2.2.1:
micromatch "^3.1.10"
readable-stream "^2.0.2"
redux-devtools-extension@^2.13.8:
version "2.13.8"
resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.8.tgz#37b982688626e5e4993ff87220c9bbb7cd2d96e1"
redux-thunk@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622"