rewriteImports =
	({ ast, usedDependencyMap }) =>
	bin =>
		editWithAST(ast, bin, {
			/**
			 * @param {NodePath<ModuleImport>} path path
			 */
			ModuleImport(path) {
				const result = usedDependencyMap.get(
					`${path.node.module}:${path.node.name}`
				);

				if (result !== undefined) {
					path.node.module = result.module;
					path.node.name = result.name;
				}
			}
		})
Mangle import names and modules
@param {object} state state
@param {AST} state.ast Module's ast
@param {Map<string, UsedWasmDependency>} state.usedDependencyMap mappings to mangle names
@returns {ArrayBufferTransform} transform