Advertisement

플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`

Nov. 17, 2020
Advertisement

More Related Content

Advertisement

플렉스팀 프론트엔드 기술 스택의 이해: `lint`, `build`, `run`

  1. : `lint`, `build`, `run` 2020-11-17 ( )
  2. • : 1. ? 2. ? • ! • React, Redux, styled-components • (👀)
  3. • `lint` • `build` • `run`
  4. `lint` • eslint • prettier • lint-staged + husky
  5. “ !”
  6. `lint`: eslint
  7. `lint`: eslint – • rule • • plugins • , • extends • (`.eslintrc`) • overrides • • 👀
  8. “ !”
  9. `lint`: tslint
  10. “eslint tslint !”
  11. `lint`: eslint – typescript-eslint
  12. “ !”
  13. `lint`: prettier • “ !” • •
  14. `lint`: prettier – • “Prettier has a few options because of history. But we don’t want more of them. (…) By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.” • • 

  15. “eslint prettier !”
  16. `lint`: eslint + prettier
  17. “ , !” “CI !”
  18. `lint`: lint-staged + husky • husky • “Git hooks made easy” • lint-staged • “Run linters against staged git files and don't let  💩 slip into your code base!”
  19. `build` • babel • webpack • Sentry
  20. “ ECMAScript !”
  21. `build`: babel • ES6 ➡ ES5 (6to5) • babel • ES5
  22. `build`: babel – • • plugin: • preset: • • polyfill: 
 / • 👀 : Babel
  23. “ / , !”
  24. `build`: babel – preset-env • “@babel/preset-env is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, browser polyfills) are needed by your target environment(s). • (browserslist)
  25. “ !” “ , !”
  26. `build`: webpack
  27. `build`: webpack – • ( ) = • • babel-loader:
 JS 
 JS • ts-loader:
 TS 
 JS
  28. `build`: webpack – • • ts-loader + babel-loader:
 TS 
 JS 
 JS • JS / JSON
  29. `build`: webpack – • test: • use: • : • .css 
 sass-loader, css-loader, style- loader
  30. `build`: webpack – • • • fork-ts-checker-plugin: • terser-webpack-plugin: Minification • sentry-webpack-plugin: Sentry CLI • antd-dayjs-webpack-plugin: antd moment.js day.js
  31. `build`: webpack – • entry / output • , • resolve • require import • mode • ( , ) • 👀 ( )
  32. “ !”
  33. `build`: Sentry • • flex 3 • • express (requestHandler / errorHandler) • • axios error interceptor ( ) • React ErrorBoundary ( )
  34. “ !”
  35. `build`: Sentry (Release) • Sentry Release API • Sentry • SDK • with-sourcemap, sentry-webpack-plugin • Release API • CI/CD ( AWS CodeBuild) •
  36. `run` • Next.js • swr • openapi-generator
  37. “ React !” , , , …
  38. `run`: Next.js • “The React Framework for Production” • SSR, , , • out-of-box • : Next.js 10 next/image
  39. `run`: Next.js – SSR • SSR , • , • ,
 DOM React (hydration) • • , • /
  40. `run`: Next.js – • env • • assetPrefix • CDN • webpack • Next.js • 👀
  41. “ !” , UX, …
  42. `run`: swr • = + • 
 • stale-while-revalidate • 
 UX • (Redux )
  43. `run`: swr • key: • • fetcher: • data: fetcher ( await ) • error: • 👀 Redux SWR 1 2
  44. “API Swagger , !”
  45. `run`: openapi-generator • OpenAPI • , URL, / 
 • 👀 OpenAPI Specification - API : VS
  46. What’s next? • Rome Toolchain • Webpack 5 (module federation) • GraphQL, Relay
  47. … What’s next? • Rome Toolchain • Webpack 5 (module federation) • GraphQL, Relay
Advertisement