Commit 8be08bab authored by Benjamin Chodoroff's avatar Benjamin Chodoroff
Browse files

add server-side debug command to package.json

parent 88724ab6
......@@ -117,6 +117,13 @@ full-fledged site relying on your own, we recommend looking into running a
copy of `steemd` locally instead
[https://github.com/steemit/steem](https://github.com/steemit/steem).
#### Debugging SSR code
`yarn debug` will build a development version of the codebase and then start the
local server with `--inspect-brk` so that you can connect a debugging client.
You can use Chromium to connect by finding the remote client at
`chrome://inspect/#devices`.
#### Configuration
The intention is to configure condenser using environment variables. You
......
......@@ -15,6 +15,7 @@
"precommit": "lint-staged",
"production": "NODE_ENV=production node lib/server/index.js",
"start": "NODE_ENV=development babel-node ./webpack/dev-server.js",
"debug": "NODE_ENV=development webpack --config ./webpack/debug.config.js && rm -rf ./lib && babel src --source-maps --out-dir lib -D && node --inspect-brk lib/server/index.js",
"checktranslations": "node scripts/check_translations.js",
"storybook": "start-storybook -p 9001 -c .storybook",
"storybook-build": "build-storybook -c .storybook -o docs"
......
const webpack = require('webpack');
const git = require('git-rev-sync');
const baseConfig = require('./base.config');
module.exports = {
...baseConfig,
devtool: 'cheap-module-eval-source-map',
output: {
...baseConfig.output,
publicPath: '/assets/',
},
module: {
...baseConfig.module,
rules: [
...baseConfig.module.rules,
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
BROWSER: JSON.stringify(true),
NODE_ENV: JSON.stringify('development'),
VERSION: JSON.stringify(git.long()),
}
}),
...baseConfig.plugins,
],
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment