Custom application configuration in source code

  • Release version: Yokohama
  • Updated March 20, 2026
  • 4 minutes to read
  • Configure a custom application [sys_app] in the now.config.json file for an application in source code.

    You can configure the application settings and aspects specific to developing the application in source code, such as the directory structure. In the now.config.json file, add the following parameters to configure the application settings.

    Table 1. Supported now.config.json parameters
    Parameter Type Description
    appOutputDir String Directory to output the build artifacts to for packaging. The pack and install commands refer to this directory to package the artifacts.

    Default: dist/app

    clientDir String Directory containing the client-side files for developing user interfaces with React.

    Default: src/client

    dependencies Object The items in another application scope on which your application depends. You must specify the application scope and the dependency type and names or sys_ids.
    "dependencies": {
        "<scope>": {
          "<type>": ["<sys_id or name>"],
          ...
        },
        ...
    }

    For more information, see Download ServiceNow Fluent application dependencies.

    fluentDir String Directory containing ServiceNow Fluent files (.now.ts) that define application metadata in source code.

    Default: src/fluent

    generatedDir String Directory containing generated ServiceNow Fluent files, including existing application metadata converted into ServiceNow Fluent code. This directory is relative to the directory defined with the fluentDir parameter.

    Default: generated

    ignoreTransformTableList Array A list of tables to ignore when transforming application metadata into source code.
    metadataDir String Directory containing the application's metadata as XML files.

    Default: metadata

    modulePaths Object A map of the module source files to their equivalent output files for if you use a custom transpilation step before building the application. For more information, see Using TypeScript in JavaScript modules with the ServiceNow SDK.
    Warning:
    You can't use this parameter and the tsconfigPath parameter. Configuring both results in an error.
    packOutputDir String Directory to output the installable package (.zip file) when building the application. The install command refers to this directory to install the package.

    Default: target

    serverModulesDir String Directory containing the JavaScript or TypeScript files to be built into JavaScript modules for use in server-side scripts.

    Default: src/server

    serverModulesExcludePatterns Array A list of file patterns to exclude when building JavaScript modules.
    Default:
    [
      "**/*.test.ts",
      "**/*.test.js",
      "**/*.d.ts"
    ]
    serverModulesIncludePatterns Array A list of file patterns to include when building JavaScript modules.
    Default:
    [
      "**/*.ts",
      "**/*.tsx",  
      "**/*.js",
      "**/*.jsx",
      "**/*.cts",
      "**/*.cjs",
      "**/*.mts",
      "**/*.mjs",
      "**/*.json"
    ]
    staticContentDir String Directory to output the static asset files used for developing user interfaces.

    Default: dist/static

    staticContentPaths Object A map of the client-side source files to the output paths for static asset files.
    defaultLanguage String The BCP 47 code of a default language for field labels [sys_documentation] in a table or column. The default language is used to resolve field labels with multiple languages.

    Default: en

    tableOutputFormat String The type of build artifacts for table metadata XML generated from ServiceNow Fluent code.
    Valid values:
    • bootstrap: The build process outputs a bootstrap XML file with the <database> root element for the table, field label XML files [sys_documentation], licensing configuration XML files [ua_table_licensing_config], and auto-numbering XML files [sys_number].
    • component: The build process outputs XML files for each component of the Table API.

    Default: bootstrap

    taxonomy Object A configuration for organizing generated ServiceNow Fluent files, which maps table names to directories and defines a fallback directory. The default taxonomy configuration uses ServiceNow standard table classifications to add generated ServiceNow Fluent files in a logical directory structure within the fluent/generated directory when metadata is initially transformed into ServiceNow Fluent code. For example:
    • Business rules [sys_script] are added to the fluent/generated/server-development/business-rule directory.
    • Script includes [sys_script_include] are added to the fluent/generated/server-development/script-include directory.

    You can override the default mappings or configure additional ones. In the following example, the configuration overrides the default directory for business rules [sys_script] and the fallback folder and configures an additional mapping for metadata from a custom table.

    "taxonomy": {
            "mapping": {
                "sys_script": "scripts/server/rules",
                "custom_table": "my-custom-folder/my-nested-folder"
            },
            "fallbackFolderName": "unclassified"
    }
    • mapping: An object that maps table names to directories. Directory paths are relative to the directory configured with the generatedDir parameter and must include only lowercase letters, numbers, hyphens, underscores, and slashes to separate subdirectories.
    • fallbackFolderName: A name for a directory to use for tables that don't have a default or a custom mapping configured. Within this directory, ServiceNow Fluent files are added to subdirectories named after the table, such as src/fluent/generated/other/x-unmapped-table/.

    Default: Default taxonomy mappings are defined for all standard ServiceNow tables and are automatically applied when no custom configuration is defined in the now.config.json for an application. The default value of fallbackFolderName is other.

    trustedModules Array A list of npm packages to identify as trusted (or internal). Trusted modules have access to ServiceNow APIs. For example:
    "trustedModules": [
      "<package-name>",  // Specific package
      "@servicenow/*"  // All packages from an organization
    ]

    In the EcmaScript Module [sys_module] table, the External source field is set to false for trusted modules.

    Warning:
    Only add dependencies that you trust completely as trusted modules.
    Valid patterns:
    • Fully qualified package names, such as '@servicenow/sdk'.
    • Organization prefixes with a wildcard, such as '@servicenow/*' or '@mycompany/*'.
    tsconfigPath String A path to a tsconfig.json file with custom options for transpiling TypeScript into JavaScript during the build process. Specifying a tsconfigPath generates diagnostic results from TypeScript using the tsconfig.json file.
    Warning:
    You can't use this parameter and the modulePaths parameter. Configuring both results in an error.

    Default: .

    Application configuration in source code

    {
      "scope": "x_snc_example_app",
      "scopeId": "2f8400eb07426110f736e28f69d3017a",
      "name": "ExampleApp",
      "dependencies": {
        "global": {
          "tables": ["incident"],
          "roles": ["admin"],
        },
        "x_custom": {
          "tables": ["custom_table"]
        }
      },
      "metadataDir": "metadata",
      "fluentDir": "src/fluent",
      "generatedDir": "generated",
      "serverModulesDir": "src/server",
      "clientDir": "src/client",
      "appOutputDir": "dist/app",
      "staticContentDir": "dist/static",
      "packOutputDir": "target",
      "modulePaths": {
          "src/server/*.ts": "dist/server/*.js",
        },
      "staticContentPaths": {
          "src/client/*.html": "dist/static/*.html",
        },
      "ignoreTransformTableList": ["ua_table_licensing_config", "sys_embedded_help_role"],
      "taxonomy": {
            "mapping": {
                "sys_script": "scripts/server/rules",
                "custom_table": "my-custom-folder/my-nested-folder"
            },
            "fallbackFolderName": "unclassified" 
        }
    }