Create React App
How to debug build process?
- Zmodyfikuj
const resolveApp = relativePath => path.resolve(appDirectory, '../../', relativePath);
const config = configFactory('production');
fs.writeFileSync('./webpackConfig.json', JSON.stringify(config));
- Run VSCode debugger
debugger;
- Inspect webpack.config.json
{
module: {
rules: [
{
"test": {},
"enforce": "pre",
"use": [
{
"options": {
"cache": true,
"formatter": "node_modules/react-dev-utils/eslintFormatter.js",
"eslintPath": "node_modules/react-scripts/node_modules/eslint/lib/api.js",
"resolvePluginsRelativeTo": "node_modules/react-scripts/config",
"ignore": false,
"baseConfig": {
"extends": ["node_modules/eslint-config-react-app/index.js"]
},
"useEslintrc": false
},
"optionsWhenExtendEslintTrue": {
"cache": true,
"formatter": "node_modules/react-dev-utils/eslintFormatter.js",
"eslintPath": "node_modules/react-scripts/node_modules/eslint/lib/api.js",
"resolvePluginsRelativeTo": "node_modules/react-scripts/config",
"ignore": true,
"useEslintrc": true
},
"loader": "ode_modules/eslint-loader/dist/cjs.js"
}
],
"include": "web-app/src"
},
]
}
}