public function compile(string $path, array $data = [])
    {
        // If the file can't be found it's probably supplied as a template within
        // one of the base directories
        $path = $this->find($path);

        // Make sure that we use the right resolver for the initial file
        $engine = $this->factory->getEngineFromPath($path);

        // this path needs to be string
        return $view = new View(
            $this->factory,
            $engine,
            $path, // view (not sure what it does)
            $path,
            $data
        );
    }