By default this flattens modules... but then the js isn't flattened, so the types don't match the js. What is the intended way to use that mode?