Repository: rollup/rollup
File: src/utils/logs.ts (TypeScript)

Code before:
}

export function logUnknownOption(
	optionType: string,
	unknownOptions: string[],
	validOptions: string[]
): RollupLog {
	return {
		code: UNKNOWN_OPTION,
		message: `Unknown ${optionType}: ${unknownOptions.join(
			', '
		)}. Allowed options: ${validOptions.join(', ')}`
	};
}

export function logEntryCannotBeExternal(unresolvedId: string): RollupLog {
	return {
		code: UNRESOLVED_ENTRY,
		message: `Entry module "${relativeId(unresolvedId)}" cannot be external.`
	};
}

export function logExternalModulesCannotBeIncludedInManualChunks(source: string): RollupLog {
	return {
		code: EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS,
		message: `"${source}" cannot be included in manualChunks, because it is resolved as an external module by the "external" option or plugins.`
	};
}

export function logExternalModulesCannotBeTransformedToModules(source: string): RollupLog {
	return {
		code: EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES,
		message: `${source} is resolved as an module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`
	};
}

export function logUnresolvedEntry(unresolvedId: string): RollupLog {
	return {
		code: UNRESOLVED_ENTRY,
		message: `Could not resolve entry module "${relativeId(unresolvedId)}".`
	};
}

export function logUnresolvedImport(source: string, importer: string): RollupLog {
	return {
		code: UNRESOLVED_IMPORT,
		exporter: source,
		id: importer,
		message: `Could not resolve "${source}" from "${relativeId(importer)}"`
	};
}

Review comment (suggestion):
```suggestion
		message: `"${source}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`
```

Code after:
}

export function logUnknownOption(
	optionType: string,
	unknownOptions: string[],
	validOptions: string[]
): RollupLog {
	return {
		code: UNKNOWN_OPTION,
		message: `Unknown ${optionType}: ${unknownOptions.join(
			', '
		)}. Allowed options: ${validOptions.join(', ')}`
	};
}

export function logEntryCannotBeExternal(unresolvedId: string): RollupLog {
	return {
		code: UNRESOLVED_ENTRY,
		message: `Entry module "${relativeId(unresolvedId)}" cannot be external.`
	};
}

export function logExternalModulesCannotBeIncludedInManualChunks(source: string): RollupLog {
	return {
		code: EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS,
		message: `"${source}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`
	};
}

export function logExternalModulesCannotBeTransformedToModules(source: string): RollupLog {
	return {
		code: EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES,
		message: `${source} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`
	};
}

export function logUnresolvedEntry(unresolvedId: string): RollupLog {
	return {
		code: UNRESOLVED_ENTRY,
		message: `Could not resolve entry module "${relativeId(unresolvedId)}".`
	};
}

export function logUnresolvedImport(source: string, importer: string): RollupLog {
	return {
		code: UNRESOLVED_IMPORT,
		exporter: source,
		id: importer,
		message: `Could not resolve "${source}" from "${relativeId(importer)}"`
	};
}