chore(inspector-monitor): improve demo webpack config

This commit is contained in:
FaberVitale 2021-07-25 12:47:28 +02:00
parent 4c8a6c928a
commit 7a579532bf
3 changed files with 4 additions and 7 deletions

View File

@ -17,7 +17,7 @@ module.exports = {
'./demo/src/js/index', './demo/src/js/index',
], ],
output: { output: {
path: path.join(__dirname, 'demo/dist'), path: path.join(__dirname, './dist'),
filename: 'js/bundle.js', filename: 'js/bundle.js',
}, },
module: { module: {
@ -60,5 +60,5 @@ module.exports = {
}, },
historyApiFallback: true, historyApiFallback: true,
}, },
devtool: 'eval-source-map', devtool: isProduction ? 'sourcemap' : 'eval-source-map',
}; };

View File

@ -24,10 +24,7 @@ function getDebugSessionKey() {
return matches && matches.length > 0 ? matches[1] : null; return matches && matches.length > 0 ? matches[1] : null;
} }
const ROOT = const ROOT = '/';
process.env.NODE_ENV === 'production'
? '/redux-devtools-inspector-monitor/'
: '/';
const DevTools = getDevTools(window.location); const DevTools = getDevTools(window.location);

View File

@ -24,7 +24,7 @@
"scripts": { "scripts": {
"start": "webpack-dev-server --config demo/config/webpack.config.ts", "start": "webpack-dev-server --config demo/config/webpack.config.ts",
"stats": "webpack --profile --json > stats.json", "stats": "webpack --profile --json > stats.json",
"build:demo": "NODE_ENV=production webpack -p", "build:demo": "cross-env NODE_ENV=production webpack -p --config demo/config/webpack.config.ts",
"build": "npm run build:types && npm run build:js", "build": "npm run build:types && npm run build:js",
"build:types": "tsc --emitDeclarationOnly", "build:types": "tsc --emitDeclarationOnly",
"build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline", "build:js": "babel src --out-dir lib --extensions \".ts,.tsx\" --source-maps inline",