[컴] vendure gatsby storefront build

 

storefront / 개츠비 / 게츠비 client / gatsbyjs client / gatsby

vendure gatsby storefront build

다음 vendure 의 gatsby storefront 를 빌드해 보려 한다.

  1. .env.production을 만들어서 넣는다. ini GATSBY_VENDURE_SHOP_API_URL=https://readonlydemo.vendure.io/shop-api
  2. npm run build 를 하면 gatsby build가 실행된다. build 를 완료하면, /public에 page들이 만들어진다. 그외 다른 file 들도 /public folder에 만들어진다.

vendure storefront 띄우기(gatsby)

빌드와 비슷하다.

  1. .env.production 만들기
    • npm run build(gatsby build) : 이를 실행하면, .env.production 을 사용한다.
    • npm run develop(gatsby develop --inspect) : 바로 빌드하고, 서버를 띄워준다. --inspect option 으로.
    • npm run start(gatsby develop) : 바로 빌드하고, 서버를 띄워준다.
    • npm run serve(gatsby serve)
npm run build

build 가 되고나며, 어떤 것이 SSG 인지, SSR 인지 알 수 있다. (그림참고)


D:\gatsby-starter>npm run build    

> gatsby-starter-default@0.1.0 build
> gatsby build

success compile gatsby files - 1.483s
success load gatsby config - 0.034s
success load plugins - 0.673s
success onPreInit - 0.008s
success initialize cache - 0.101s
success copy gatsby files - 0.280s
success Compiling Gatsby Functions - 0.331s
success onPreBootstrap - 0.350s
success createSchemaCustomization - 2.025s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.354s
info Writing GraphQL type definitions to
D:/gatsby-starter/.cache/schema.gql
success building schema - 0.481s
⠇ createPages
...
⠸ createPages
⠴ createPages
success createPages - 123.379s
success compile gatsby files - 1.483s
success load gatsby config - 0.034s
success load plugins - 0.673s
success onPreInit - 0.008s
success initialize cache - 0.101s
success copy gatsby files - 0.280s
success Compiling Gatsby Functions - 0.331s
success onPreBootstrap - 0.350s
success createSchemaCustomization - 2.025s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.354s
info Writing GraphQL type definitions to
D:/gatsby-starter/.cache/schema.gql
success building schema - 0.481s
success createPages - 123.379s
success createPagesStatefully - 0.075s
info Total nodes: 222, SitePage nodes: 70 (use --verbose for breakdown)
success Checking for changed pages - 0.002s
success Cleaning up stale page-data - 0.004s
success onPreExtractQueries - 0.002s
success extract queries from components - 1.766s
success write out redirect data - 0.003s
success Build manifest and related icons - 0.148s
success onPostBootstrap - 0.157s
info bootstrap finished - 134.671s
success write out requires - 0.010s
success Building production JavaScript and CSS bundles - 9.858s
success Building Rendering Engines - 24.734s
success Building HTML renderer - 10.259s
success Execute page configs - 0.044s
success Validating Rendering Engines - 1.869s
success Caching Webpack compilations - 0.002s
success run queries in workers - 1.030s - 73/73 70.87/s
success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 170.795s - 237/237 1.39/s
success Merge worker state - 0.003s
success Rewriting compilation hashes - 0.002s
success Writing page-data.json files to public directory - 0.020s - 69/70 3502.40/s
success Building static HTML for pages - 4.962s - 69/69 13.90/s
success onPostBuild - 0.004s
success compile gatsby files - 1.483s
success load gatsby config - 0.034s
success load plugins - 0.673s
success onPreInit - 0.008s
success initialize cache - 0.101s
success copy gatsby files - 0.280s
success Compiling Gatsby Functions - 0.331s
success onPreBootstrap - 0.350s
success createSchemaCustomization - 2.025s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.354s
info Writing GraphQL type definitions to
D:/gatsby-starter/.cache/schema.gql
success building schema - 0.481s
success createPages - 123.379s
success createPagesStatefully - 0.075s
info Total nodes: 222, SitePage nodes: 70 (use --verbose for breakdown)
success Checking for changed pages - 0.002s
success Cleaning up stale page-data - 0.004s
success onPreExtractQueries - 0.002s
success extract queries from components - 1.766s
success write out redirect data - 0.003s
success Build manifest and related icons - 0.148s
success onPostBootstrap - 0.157s
info bootstrap finished - 134.671s
success write out requires - 0.010s
success Building production JavaScript and CSS bundles - 9.858s
success Building Rendering Engines - 24.734s
success Building HTML renderer - 10.259s
success Execute page configs - 0.044s
success Validating Rendering Engines - 1.869s
success Caching Webpack compilations - 0.002s
success run queries in workers - 1.030s - 73/73 70.87/s
success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 170.795s - 237/237 1.39/s
success Merge worker state - 0.003s
success Rewriting compilation hashes - 0.002s
success Writing page-data.json files to public directory - 0.020s - 69/70 3502.40/s
success Building static HTML for pages - 4.962s - 69/69 13.90/s
success onPostBuild - 0.004s
info Done building in 189.1672697 sec
success compile gatsby files - 1.483s
success load gatsby config - 0.034s
success load plugins - 0.673s
success onPreInit - 0.008s
success initialize cache - 0.101s
success copy gatsby files - 0.280s
success Compiling Gatsby Functions - 0.331s
success onPreBootstrap - 0.350s
success createSchemaCustomization - 2.025s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.354s
info Writing GraphQL type definitions to
D:/gatsby-starter/.cache/schema.gql
success building schema - 0.481s
success createPages - 123.379s
success createPagesStatefully - 0.075s
info Total nodes: 222, SitePage nodes: 70 (use --verbose for breakdown)
success Checking for changed pages - 0.002s
success Cleaning up stale page-data - 0.004s
success onPreExtractQueries - 0.002s
success extract queries from components - 1.766s
success write out redirect data - 0.003s
success Build manifest and related icons - 0.148s
success onPostBootstrap - 0.157s
info bootstrap finished - 134.671s
success write out requires - 0.010s
success Building production JavaScript and CSS bundles - 9.858s
success Building Rendering Engines - 24.734s
success Building HTML renderer - 10.259s
success Execute page configs - 0.044s
success Validating Rendering Engines - 1.869s
success Caching Webpack compilations - 0.002s
success run queries in workers - 1.030s - 73/73 70.87/s
success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 170.795s - 237/237 1.39/s
success Merge worker state - 0.003s
success Rewriting compilation hashes - 0.002s
success Writing page-data.json files to public directory - 0.020s - 69/70 3502.40/s
success Building static HTML for pages - 4.962s - 69/69 13.90/s
success onPostBuild - 0.004s
info Done building in 189.1672697 sec
success compile gatsby files - 1.483s
success load gatsby config - 0.034s
success load plugins - 0.673s
success onPreInit - 0.008s
success initialize cache - 0.101s
success copy gatsby files - 0.280s
success Compiling Gatsby Functions - 0.331s
success onPreBootstrap - 0.350s
success createSchemaCustomization - 2.025s
success Checking for changed pages - 0.002s
success source and transform nodes - 0.354s
info Writing GraphQL type definitions to
D:/gatsby-starter/.cache/schema.gql
success building schema - 0.481s
success createPages - 123.379s
success createPagesStatefully - 0.075s
info Total nodes: 222, SitePage nodes: 70 (use --verbose for breakdown)
success Checking for changed pages - 0.002s
success Cleaning up stale page-data - 0.004s
success onPreExtractQueries - 0.002s
success extract queries from components - 1.766s
success write out redirect data - 0.003s
success Build manifest and related icons - 0.148s
success onPostBootstrap - 0.157s
info bootstrap finished - 134.671s
success write out requires - 0.010s
success Building production JavaScript and CSS bundles - 9.858s
success Building Rendering Engines - 24.734s
success Building HTML renderer - 10.259s
success Execute page configs - 0.044s
success Validating Rendering Engines - 1.869s
success Caching Webpack compilations - 0.002s
success run queries in workers - 1.030s - 73/73 70.87/s
success Running gatsby-plugin-sharp.IMAGE_PROCESSING jobs - 170.795s - 237/237 1.39/s
success Merge worker state - 0.003s
success Rewriting compilation hashes - 0.002s
success Writing page-data.json files to public directory - 0.020s - 69/70 3502.40/s
success Building static HTML for pages - 4.962s - 69/69 13.90/s
success onPostBuild - 0.004s
info Done building in 189.1672697 sec


Pages

┌ src/templates/collection.tsx
│ ├   /collection/electronics
│ └   ...8 more pages available
├ src/templates/product.tsx
│ ├   /product/laptop
│ └   ...53 more pages available
├ src/pages/404.tsx
│ ├   /404/
│ └   /404.html
├ src/pages/about.tsx
│ └   /about/
├ src/pages/index.tsx
│ └   /
├ src/pages/search.tsx
│ └   /search/
├ src/pages/using-ssr.tsx
│ └ ∞ /using-ssr/
└ src/pages/using-typescript.tsx
  └   /using-typescript/

  ╭────────────────────────────────────────────────────────────────╮
  │                                                                │
  │   (SSG) Generated at build time                                │
  │ D (DSG) Deferred static generation - page generated at runtime │
  │ ∞ (SSR) Server-side renders at runtime (uses getServerData)    │
  │ λ (Function) Gatsby function                                   │
  │                                                                │
  ╰────────────────────────────────────────────────────────────────╯

Reference

  1. Create a New React App – React
  2. Porting from Create React App to Gatsby | Gatsby

댓글 없음:

댓글 쓰기