> For the complete documentation index, see [llms.txt](https://mixdao.gitbook.io/dfinity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mixdao.gitbook.io/dfinity/si-.-jiao-cheng/5.-ji-suan-han-shu-zhong-shi-yong-zheng-shu/xiu-gai-mo-ren-pei-zhi.md).

# 修改默认配置

在探索默认项目章节，已经介绍了创建新项目会添加一个dfx.json配置文件到项目目录。在本章节中，需要修改一些默认配置。

dfx.json配置修改步骤

1. 在编辑器中，打开 dfx.json 配置文件。
2. 修改默认的main设置。\
   例如

   ```
   "main": "src/calc/calc_main.mo",
   ```

   这里，修改源文件名名称可以让dfx.json配置文件找到合适的文件进行编译。

   在更复杂的应用中，dfx.json配置文件中可能会有多个你要包含依赖的源文件需要管理。这种情况下-dfx.json文件中定义了多个canister和程序-有多个被命名为main.mo的文件可能会导致混乱。

   文件的其他部分无需修改。
3. 保存并关闭dfx.json继续。
