Skip to content

dao3Cfg Configuration Attributes

In the configuration file dao3.config.json, you can set the compilation and upload behavior. Below is a detailed description of the configuration structure and each attribute.

Configuration Example

json
{
  "ArenaPro": {
    "npmPackage": null,
    "file": {
      "typescript": {
        "server": {
          "entry": "src/App.ts",
          "ECS": false,
          "development": true
        },
        "client": {
          "entry": "src/clientApp.ts",
          "ECS": false,
          "development": true
        },
        "developmentAll": null,
        "jsUpdate": true
      }
    },
    "outputAndUpdate": [
      "bundle.js",
      {
        "name": "bundle2.js",
        "serverEntry": "src/App.ts",
        "clientEntry": "src/clientApp.ts",
        "description": "Example of a second code module, can be changed."
      }
    ],
    "map": {
      "id": "",
      "editHash": "",
      "playHash": ""
    }
  }
}

Attribute Descriptions

Server-side Configuration

AttributeRequiredTypeDefaultDescription
file.typescript.serverobjectArena server-side project configuration
file.typescript.server.entrystringApp.tsArena server-side project entry file
file.typescript.server.ECSbooleanfalseWhether to enable ECS architecture for the Arena server-side project
file.typescript.server.developmentbooleantrueServer-side project compilation mode, defaults to development mode, priority is lower than developmentAll

Client-side Configuration

AttributeRequiredTypeDefaultDescription
file.typescript.clientobjectArena client-side project configuration
file.typescript.client.entrystringclientApp.tsArena client-side project entry file
file.typescript.client.ECSbooleanfalseWhether to enable ECS architecture for the Arena client-side project
file.typescript.client.developmentbooleantrueClient-side project compilation mode, defaults to development mode, priority is lower than developmentAll

Common Compilation Settings

AttributeRequiredTypeDefaultDescription
file.typescript.developmentAllboolean | nullnullWhether to enable webpack's creator mode? If enabled, client and server code will not be compressed or obfuscated. If null, this attribute is ignored.
file.typescript.jsUpdatebooleantrueWhether to automatically upload to the map after compiling the script? If disabled, it only compiles without uploading.

File Output and Upload

AttributeRequiredTypeDefaultDescription
outputAndUpdateobjectCurrent compilation file configuration, defaults to the first data entry.
outputAndUpdate.namestringbundle.jsFile name to be uploaded to the Box3 script editor, must have a .js suffix.
outputAndUpdate.serverEntrystringServer-side entry file to be uploaded to the Box3 script editor.
outputAndUpdate.clientEntrystringClient-side entry file to be uploaded to the Box3 script editor.
outputAndUpdate.descriptionstringA note for the current configuration, can be used to distinguish configurations.

Map Information

AttributeRequiredTypeDefaultDescription
map.idstring""The extended map ID corresponding to the current Arena project.
map.editHashstring""The creator-end Hash of the extended map corresponding to the current Arena project.
map.playHashstring""The player-end Hash of the extended map corresponding to the current Arena project.

Special Configuration

AttributeRequiredTypeDefaultDescription
npmPackage"server" | "client"Is the current project a Box3 component library (npm package)? If so, specify the end name to stop building the other end and speed up the process.

神岛实验室