Skip to content
Snippets Groups Projects
Commit 598f528c authored by Benjamin Chodoroff's avatar Benjamin Chodoroff
Browse files

add server-side debug command to package.json

parent b13d443f
No related branches found
No related tags found
No related merge requests found
...@@ -117,6 +117,13 @@ full-fledged site relying on your own, we recommend looking into running a ...@@ -117,6 +117,13 @@ full-fledged site relying on your own, we recommend looking into running a
copy of `steemd` locally instead copy of `steemd` locally instead
[https://github.com/steemit/steem](https://github.com/steemit/steem). [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 #### Configuration
The intention is to configure condenser using environment variables. You The intention is to configure condenser using environment variables. You
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
"precommit": "lint-staged", "precommit": "lint-staged",
"production": "NODE_ENV=production node lib/server/index.js", "production": "NODE_ENV=production node lib/server/index.js",
"start": "NODE_ENV=development babel-node ./webpack/dev-server.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", "checktranslations": "node scripts/check_translations.js",
"storybook": "start-storybook -p 9001 -c .storybook", "storybook": "start-storybook -p 9001 -c .storybook",
"storybook-build": "build-storybook -c .storybook -o docs" "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,
],
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment