Skip to content

Unable to override config via mcconfig #1568

@eliandoran

Description

@eliandoran

Build environment: Windows
Moddable SDK version: If you are unsure, display it in the terminal using: 7.1.0-2-ge483dc6bf
Target device: Desktop simulator

Description

Steps to Reproduce

  1. Define in manifest.json:
  "config": {
    "startUrl": "/"
  },
  1. In the app:
import config from "mc/config";
trace("URL: ", config.startUrl);
  1. Run mcconfig -d -m -p sim --startUrl="/settings" (or mcconfig -d -m -p sim --startUrl-=/settings)

Notice how start URL is the one from the config (/) instead of the overridden one.

Expected behavior

According to documentation for mcconfig, I can override the config arguments:

config arguments specified in the form of key-=value or key="value". These are merged into the config section of the manifest. Import the mc/config module to access them

So in this case the log should be URL: /settings instead of /.

Images
Screenshots or photos to help explain the problem

Other information

  • If the config doesn't exist in the first place and I try to override it, it comes out undefined.
  • Bonus issue: mcconfig -d -m -p sim --startUrl="/settings?page=foo" results in ### Error: '--startUrl=/settings?page=foo': manifest not found!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions