Skip to content

How to adjust structure folder for monorepositories? #426

Description

@flo-sch

I work with typescript and nx.dev workspace: a build tool allowing to easily lint, test, build and share source code inside a monorepo (using TS path mapping from a root tsconfig.base.json).

It works with a specific folder structure which makes it a bit hard to combine with Azure Functions:

/tsconfig.base.json
/package.json
/node_modules
/host.json (?)
/.funcignore (?)
/apps
  /app1
  /app2
  /app3
/libs
  /lib1
  /lib2
/tools
  ...

As far as I know, Azure Functions Core Tools only parse one level of subfolders to find function.json files (for func start or func azure functionapp publish <name>).
Unfortunately, since nx works with an apps main subfolder, I cannot put the function.json inside each "app" and have to create a bunch subfolders in the root level to put the function.json for each app, adding a scriptFile to reference the output of nx serve.

Is there any way to configure the core tools to look for function.json inside ./apps/*/function.json instead?

I have read in the issues here about --prefix and --script-root flags but I did not manage to make it work (and do not find those documented neither)

Thanks a bunch in advance 🙏

Example repository here: https://github.com/flo-sch/nx-workspace-azure-function

Issue related to:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions