Skip to content

Import Resolution

mille classifies each import as “Internal” or “External” per language. The [resolve.*] sections configure this resolution logic.

[resolve.typescript]

KeyDescription
tsconfigPath to tsconfig.json. mille reads compilerOptions.paths and resolves aliases as internal imports.
[resolve.typescript]
tsconfig = "./tsconfig.json"

Import classification:

ImportClassification
import X from "./module"Internal
import X from "../module"Internal
import X from "@/module" (tsconfig path alias)Internal
import X from "react"External
import fs from "node:fs"External

[resolve.go]

KeyDescription
module_nameGo module name (matches go.mod). Auto-generated by mille init.
[resolve.go]
module_name = "github.com/myorg/my-go-app"

[resolve.python]

KeyDescription
src_rootRoot directory of the Python source tree (relative to mille.toml)
package_namesYour package names — imports starting with these are classified as internal
[resolve.python]
src_root = "."
package_names = ["domain", "usecase", "infrastructure"]

Import classification:

ImportClassification
from .sibling import X (relative)Internal
import domain.entity (matches package_names)Internal
import os, import sqlalchemyExternal

[resolve.java]

Used for both Java and Kotlin projects.

KeyDescription
module_nameBase package of your project (e.g. com.example.myapp). Auto-generated by mille init.
pom_xmlPath to pom.xml. Uses groupId.artifactId as module_name when not set.
build_gradlePath to build.gradle. Uses group + rootProject.name when module_name is not set.
[resolve.java]
module_name = "com.example.myapp"

Import classification:

ImportClassification
import com.example.myapp.domain.UserInternal
import static com.example.myapp.util.Helper.methodInternal
import java.util.List, import org.springframework.*External