code: function setEntryPoints(config) {
    const CUSTOM_ENTRY = join(PROJECT_SRC_DIR, 'main.js')
  
    if (!existsSync(CUSTOM_ENTRY)) {
      const ENV = isProduction()
        ? 'production'
        : 'development'
      config.entry.index = join(REACT_ENTRY_DIR, `main.${ENV}.js`)
    } else
      config.entry.index = CUSTOM_ENTRY
  }
docs: This function will check if there’s an entry point “main.js” in the project’s
  directory and if it doesn’t find it, set to the default one. In 99% of the
  cases the custom entry will not be needed specially because the default one
  wires a bunch of helpers to trace bugs and enable hot reloading during
  development.