Create React App

How to debug build process?

  1. Zmodyfikuj
  2. // node_modules/react-scripts/config/paths.js:18
    const resolveApp = relativePath => path.resolve(appDirectory, '../../', relativePath);
    
    // node_modules/react-scripts/scripts/build.js:62
    const config = configFactory('production');
    fs.writeFileSync('./webpackConfig.json', JSON.stringify(config));
  3. Run VSCode debugger
  4. // node_modules/react-scripts/config/webpack.config.js:140
    debugger;
  5. Inspect webpack.config.json
  6. {
      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"
          },
        ]
      }
    }