Configuration
MightyMeld uses a configuration file called mightymeld.json
to understand your app. It should be
placed in the root of your repo.
System Configuration
run
"run": "npm run dev",
Default: "yarn start"
MightyMeld needs to know how to start your app.
web_server_url
"web_server_url": "http://localhost:5173",
default: "http://localhost:3000"
MightyMeld needs to know where to load your app.
meta_dir
"meta_dir": ".mightymeld",
Default: ".mightymeld"
The directory in which MightyMeld will store metadata, for example all of the visible views you are
using. We recommend you add this directory to your .gitignore
file.
envoy_dir
"envoy_dir": 3500,
Default: 3500
The port used by the MightyMeld Envoy. If port 3500 is already in use, change this to an available port.
Code Interpretation
include
"include": ["src"],
Default: ["."]
Include any directories or files that contain React components.
exclude
"exclude": ["node_modules", "__tests__"],
Default: ["node_modules"]
An optional array of filters that will be applied to file names before they are searched for code.
"node_modules"
is excluded by default. You should make sure to exclude it explicitly if you set
this field and node_modules is inside one of your include directories. Occassionaly, code will
appear that can’t be parsed by MightyMeld. For example, we currently don’t support Flow type
checking, and Flow files cause an error. Exclude such files so that you can use MightyMeld on the
remainder of your codebase.
import_replacements
// Expand ~ to client/app
"import_replacements": {
"~": "client/app"
},
import Button from '~/components/Button';
Default: not set
An optional object specifying string substitutions to perform on import statements. This allows MightyMeld to process imports it may not otherwise be able to resolve. Currently, we only support replacing the beginning characters.
variables
"variables": ["src/css/global.css"],
Default: not set
An optional array containing the path to files that contain variables (such as CSS variables) that you want to use while editing your project.
Version Control
branch_prefix
"branch_prefix": "mightymeld-",
Default: not set
If set, MightyMeld studio only operates on branches that begin with this prefix. All branches created by MightyMeld will have this prefix.
Code Formatting
run_prettier
"run_prettier": true,
Default: false
If set, Prettier will be used to format the code that MightyMeld injects. Make sure your
.prettierrc
file is in a location that's include
'd. If you don't provide a
.prettierrc
, the default Prettier settings will be used.
For security reasons, we currently don't support config files in JavaScript format (e.g.
.prettier.config.js
). If you have such a file, please convert it to a
supported JSON file.
Customization
prefab_dir
"prefab_dir": "src/prefabs",
Default: not set
An optional path of a directory that stores a prefab collection. These prefabs will appear in your library panel and be available to you for building. Documentation for the prefab file format has not yet been written.