Override Config

Similar to the backend Config, you can also use project level config to override module level config at frontend

src/front/config/config.default.js

export default{
  modules: {
    'test-party': {
      message: 'Hello World!',
      markCount: 3,
    },
  },
};

Scene

CabloyJS 3.0 introduces the concept of Scene

CabloyJS supports muilti-scenes, such as: PC/Web, PC/Electron, Mobile/H5, Mobile/IOS, Mobile/Android, Pad/IOS, Pad/Android, etc.

We can configure different parameters for different scenarios, and then build them separately

Scene Config

CabloyJS supports muiltiple config files for different scenarios:

src/front/config
|- config.default.js
|- config.web.js
|- config.app.js

config.default.js contains default common configuration of all scenarios

config.web.js is the config file of Scene web, which is the default scene

If we want to add another scene named as app, just add the config file config.app.js

Scene Build

  1. Build the default scene web
$ npm run build:front
  1. Build the scene app
$ npm run build:front -- --scene=app