Giter VIP home page Giter VIP logo

create-react-app-eject-learn's Introduction

create-react-app 代码分析

使用到的第三方插件

  1. browserslist

  2. chalk

  3. inquirer

  4. pkg-up

  5. filesize

    "browsersHelper.js", "chalk.js", "checkRequiredFiles.js", "clearConsole.js", "crossSpawn.js", "errorOverlayMiddleware.js", "eslintFormatter.js", "evalSourceMapMiddleware.js", "FileSizeReporter.js", "ForkTsCheckerWebpackPlugin.js", "formatWebpackMessages.js", "getCacheIdentifier.js", "getCSSModuleLocalIdent.js", "getProcessForPort.js", "getPublicUrlOrPath.js", "globby.js", "ignoredFiles.js", "immer.js", "InlineChunkHtmlPlugin.js", "inquirer.js", "InterpolateHtmlPlugin.js", "launchEditor.js", "launchEditorEndpoint.js", "ModuleNotFoundPlugin.js", "ModuleScopePlugin.js", "noopServiceWorkerMiddleware.js", "openBrowser.js", "openChrome.applescript", "printBuildError.js", "printHostingInstructions.js", "redirectServedPathMiddleware.js", "typescriptFormatter.js", "WatchMissingNodeModulesPlugin.js", "WebpackDevServerUtils.js", "webpackHotDevClient.js"

start流程

  1. 调用checkRequiredFiles.js检查文件是否存在(传[paths.appHtml, paths.appIndexJs])
  2. 检查端口号和host并给默认值
  3. 调用checkBrowsers.js checkBrowsers 获取browserslist里面的浏览器配置 异步加载
  4. 调用WebpackDevServerUtils中的choosePort方法(传入host port)进行判断接口是否占用

create-react-app-eject-learn's People

Contributors

yujuenianbei avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.