• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Hello,

      Is it possible to have some sort of pre-deploy or post-deploy hook for things like running scripts on compiled code? For example, in order to make custom UI work, sometimes you have to do some editing before deploying. In Next.JS as an example, you have to modify all the relative urls from /_next/ to ./_next/ in order to make everything click in place. To do this, i have to add a package.json script each time to every small custom UI portion i want to use next.js in.

      ```
      "deploy": "cd frontend && npm run build && cd .. && npm run build-fix && forge deploy",
      "build-fix": "find \"dist\" -type f -exec sed -i 's#\"/_next/#\"./_next/#g' {} +"
      ```

      I would love to see this built in to forge. By no means is this an urgent request, its just a matter of copy pasting the script over to new forge projects but something this useful should just be built in.

      *Possible Implementation:*

      A custom webpack plugin that could be ran when everything is complete with the defaults being set as `dist` or a user could provide it using a forge variable or as an arg to the forge deploy command itself. If you could detect that nextjs is being used and auto enable this hook and provide an option to disable it should the user not want it etc... Apply same logic to other frameworks that need some special handling.

      Thank you

            [ECO-316] Forge Deploy Hooks

            There are no comments yet on this issue.

              Unassigned Unassigned
              b0158e0bd325 Zishan
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: