B Properties in the oraclejetconfig.json File

The oraclejetconfig.json file supports a range of properties that you can configure to determine the behavior of your Oracle JET project.

Note:

Where Property is <prop>.<subprop> it indicates that <subprop> is a subproperty of <prop>. For example, paths.components means "paths": { "components": "value" }.

Table B-1 Properties in the oraclejetconfig.json File

Property Value Type Valid Values Default Notes
architecture String mvvm or vdom mvvm Type of app architecture.
components Object component name/version value pairs No default value exists for this property.

Component name/version value pairs for components to be restored from the component exchange upon ojet restore. Similar format to a package.json. For example:

"components": { "oj-doceg-double-picker": "^2.0.0" }

bundleName String simple file name with a .JS extension bundle.js Allows an override of the default name used for an optimized app.
bundler String webpack | <any> No default value exists for this property.

In release 11.0.0, JET introduced bundler-only support for Webpack. If webpack was specified as the value for the bundler property, the before_webpack hook was used to bundle the app. Otherwise, the before_optimize hook managed the RequireJS-based app bundling. Webpack-based bundler applied only to the app bundling. Custom component optimization continued to use RequireJS-based bundling, and could be configured with the before_component_optimize hook.

In release 12.0.0, JET introduced end-to-end Webpack support. With the --webpack argument in an ojet create command, Oracle JET creates an ojet.config.js file where you configure Webpack usage. No bundler property is configured in the oraclejetconfig.json file.

defaultBrowser String browser name chrome Sent to Apache Cordova when serving hybrid mobile apps as --target when the destination is browser.
defaultTheme String redwood, redwood-notag, stable redwood

Name of theme to use as the default in the app.

dependencies Object component name/object or version number pairs No default value exists for this property.

Names of potential component or pack dependencies used to check whether certain pre-minified components should be excluded from the ojet build --release bundling process. For example:

"dependencies": { "oj-pack-comp": { "version": "2.0.0"} }

Or

"oj-comp": "2.0.0"

enableDocGen Boolean true/false No default value exists for this property.

When true, Oracle JET generates API doc for VComponent-based web components in the .appRootDir/web/components/component-name/docs directory after you build the component using the ojet build component command if you have previously run the ojet add docgen command that installs the packages and templates to generate API doc. If you have not installed the packages and templates for API doc, the ojet build component command fails.

When false, Oracle JET does not generate API doc for VComponent-based web components.

enableLegacyPeerDeps Boolean True/False False

When true, the Oracle JET CLI modifies any invoked existing NPM install commands, such as the Oracle JET CLI’s add docgen command, to include NPM's --legacy-peer-deps flag. You need to add the enableLegacyPeerDeps property to the oraclejetconfig.json file if you want to use this optional capability. The default value of false means that NPM installations proceed without the --legacy-peer-deps flag.

exchange-url String URL No default value exists for this property.

Component exchange instance for publishing components. For example:

https://exchange.url.com/api/0.2.0

Note:

This setting can also be inherited (if not present) from a global value defined through ojet configure --exchange-url=<addr> --global which will be stored centrally (for example, .ojet/exchange-url.json)
fontUrl String URL No default value exists for this property. Link so that an Oracle JET CLI build command can insert icon fonts into Oracle JET templates. This property is associated with the injector:font token in the appRootDir/src/index.html file of your app.
generateSourceMaps Boolean true/false False When true, the Oracle JET CLI configures Terser and RequireJS packages to generate source map files when you build the Oracle JET app using the ojet build or ojet serve commands.
generatorVersion String Oracle JET CLI version No default value exists for this property. Deprecated. Historical information about the version of JET that was first used to create the project. Not used by the CLI.
installer String yarn or npm npm If specified, an alternate installer to run instead of the default npm for npm install type commands.
localComponentsSupport Boolean true/false No default value exists for this property. Indicates whether the component exchange backend supports the local components extension. The value will be recorded by the CLI in oraclejetconfig.json. If a user wants to opt out of the local components support, they can set this value to false deliberately.
paths.components String path jet-composites

Path where locally-created components are stored relative to a root that is dependent on the scaffolded project type:

  1. Project created with --vdom or --template=basic-vdom template. Root will be src/ .
  2. Project created with --typescript. Root will be src/ts/ .
  3. Default project. Root will be src/js.

Note:

In a a project created with the vdom basic template or --vdom option, this value will be pre-set to just components rather than the default jet-composites.
paths.exchangeComponents String path exchange_components Folder where components added from the exchange are stored for new virtual DOM apps. Non-virtual DOM apps (MVVM) use the older jet_components when this is not set. This path must be a simple folder name which will be created in the root of the project as a peer of the src/ folder.
paths.source.common String path src Simple folder name relative to the project root. A folder hierarchy cannot be used here. Other settings such as paths.components will be relative to this location.
paths.source.hybrid String path src-hybrid Simple folder name relative to the project root. A folder hierarchy cannot be used here.
paths.source.javascript String path js Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here. Other settings such as paths.components may be relative to this location in the relevant project type.
paths.source.styles String path css Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here.
paths.source.themes String path themes Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here.
paths.source.tsconfig String path   If specified, this subproperty enables the relocation of the tsconfig.json file from its default location at the app root. Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here.
paths.source.typescript String path ts Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here. Other settings such as paths.components may be relative to this location in the relevant project type.
paths.source.web String path src-web Simple folder name relative to the defined src folder. A folder hierarchy cannot be used here.
paths.staging.hybrid String path hybrid Path where the hybrid build products are generated.
paths.staging.themes String path staged-themes Path where themes are staged.
paths.staging.web String path web Path where the web build products are generated.
sassVer String semver-style version number 1.80.5 Dart Sass (sass) NPM package version that will be installed if sass is added
stripList Array of strings path strings No default value exists for this property. List of .gitignore-style paths to strip when ojet strip is executed. This bypasses the list in the .gitignore file.
unversioned Boolean true/false false

When true, Oracle JET generates components in a directory path without the component version number when you run ojet build or ojet serve. For example:

appRootDir/web/components/my-component-pack/my-widget-1/

Without the unversioned property or with "unversioned": false (the default), the output path is:

appRootDir/web/components/my-component-pack/1.0.0/my-widget-1/

The unversioned entry in the oraclejetconfig.json file takes precedence over the Oracle JET command-line argument (--omit-component-version). That is, if the oraclejetconfig.json file includes "unversioned": false (include component version number in the directory path) and you build your Oracle JET app using the following command, Oracle JET includes the component version in the generated directory path:

ojet build --omit-component-version

watchInterval String Number of milliseconds 1000 Configure the interval at which the live reload feature polls the Oracle JET project for updates by configuring a value for this property. The default value is 1000 milliseconds.

The remaining entries in this table describe the properties that you use to manage ICU translation bundles, as described in Work with ICU Translation Bundles in an Oracle JET Virtual DOM App.

This cell row has been left empty intentionally. This cell row has been left empty intentionally. This cell row has been left empty intentionally. This cell row has been left empty intentionally.
translationIcuLibraries String @oracle/oraclejet-icu-l10n @oracle/oraclejet-icu-l10n

The NPM package that the Oracle JET CLI's add translation command installs. You need this NPM package to generate ICU translation bundles.

buildICUTranslationsBundle Boolean true/false false

When true, the Oracle JET CLI build command generates runtime ICU translations bundles from the ICU translation bundles in your project.

translation.type String icu icu

The only supported value at present for this property is icu.

translation.options.rootDir String Root directory for the runtime ICU translation bundles. ./src/resources/nls

The root directory for ICU translation bundles. The value that the add translation command inserts is "./src/resources/nls".

translation.options.bundleName String Name of the ICU translation bundle translationBundle.json

The bundle name from which to generate runtime ICU translation bundles when you run the ojet build or serve commands. The value that the add translation command inserts is "translationBundle.json".

translation.options.locale String Language tag (For example, "en-US") en-US

The locale of the ICU translation bundle in the root directory. The value that the add translation command inserts is "en-US".

translation.options.outDir String Path to output directory ./src/resources/nls

The output directory for runtime ICU translation bundles. The value that the add translation command inserts is "./src/resources/nls". Change this to a value of your choice. For example, "./src/resources-dist".

translation.options.supportedLocales String Array of supported locales This property does not have a default value.

A comma-separated list of additional locales to build. If you specify a locale that does not have a corresponding entry in the nls directory under the rootDir directory, then the runtime ICU translation bundle is built from the ICU translation bundle in the rootDir directory. The value that the add translation command inserts is "de".

translation.options.componentBundleName String Name of component-specific ICU translation bundle ${componentName}-strings.json

Specifies the naming pattern for the ICU translation bundle associated with a component.

The add translation command inserts the value "${componentName}-strings.json" where {componentName} references the name of the component.

If you create a component named my-component, then the file name for the ICU translation bundle must be my-component-strings.json.