public function register($name, $path)
    {
        if (!Str::contains($path, '.js')) {
            throw new \Exception('Path should lead to javascript file');
        }
        $this->modules->push(compact('name', 'path'));
    }