DEV Community

Taleb
Taleb

Posted on

Make gatsbyjs build fast

Because build is not incremental, one way to make gatsbyjs build fast is to keep as much thing you can in cache .

One way to do this in Amplify Console is:

    build:
      commands:
        - nvm use $VERSION_NODE_12
        - yarn run build
  artifacts:
    baseDirectory: gatsby/public
    files:
      - '**/*'
  cache:
    paths:
      - gatsby/public/static/**/*
      - gatsby/node_modules/**/*

Discussion (0)