Skip to main content

MightyMeld Configuration

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.

local_domain

"local_domain": "192.168.0.12",

Default: "localhost"

The the hostname or domain that is used to access the machine your web app is running on (typically your local box).

Customization

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.

editor

"editor": "sublime",

Default: url:vscode://file/%FILENAME:%LINE:%COLUMN

Sets which editor will be used to open files. When you provide a string such as "code" or "sublime" MightyMeld will use the launch-editor library to open your editor of choice. A list of all supprted editors is available.

If your editor supports a custom URL scheme, you can use that method by providing a string that starts with url:, followed by the URL to use. The following variables will be replaced in the URL:

  • %FILENAME
  • %LINE
  • %COLUMN

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.

tailwind

"tailwind": true,

Default: false

If set, Tailwind AI Assist will be available for all elements in your project.

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.